Fun with Perl's Regexes, to be more precise. They're a lot more fun than
regular regexes. Here's a little quiz I made up while falling asleep last
night.

1) What's the fastest way to strip trailing whitespace ( as defined by
/\s/ ) from a decent-sized string? Decent-sized means this email, or 100 of
these emails concatenated together.
2) Is it possible to write a function which can tell me if a regex matches
the empty string? (Since the code would most likely be long, a simple why or
why not will do ;)
3) Write a regex that uses variable-width-lookahead without using the
various look-ahead operators, (?=..), (?!..), (?<=..), or (?<!..)

I'll post what I think are the answers to these questions in a few days, so
as not to ruin any of the fun. :)

Mike Lambert

Reply via email to