NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
You call that a spacey string? (Score:2)
trdoesn't recognize the\smeta character class.)So how do you tackle that in a readable language like Python? I don't know enough Python, let's stick to something I do know: PL/SQL, the (Ada-based) language Oracle includes in its databases:
That's what "readability" buys you: a requirement for a lot of extra, very low level code. But, it least it's "readable"!I wouldn't be too surprised that in general, Python makes you jump through the same hoops, as Guido is notorious for ripping out features out of the language he considers too advanced.
p.s. I like Javascript, and their solution really appeals to me:
I really like chaining in this way. Much better than the nesting of procedural function calls that you have to write backwards — the last function to call is the first one you read in the source. And Javascript knows first class regular expressions (which are like qr// objects in Perl).Reply to This