P
Phrogz
On 8 mar, 09:08, "planetthoughtful" <[email protected]>
As you asked in the Ruby list, and Perl/Python/Ruby were mentioned,
I'll give you answers for them.
An excellent, informative post. Thanks for sharing!
One question:
Ruby1.8's regexp engine is less powerful than Perl's or Python's as it
does not have backtracking, named groups or unicode (if you don't know
what that is or care, ruby1.8's regexp are perfect for you already).
If I understand the terminology correctly, the 1.8 regexp engine
doesn't support lookbehind assertions (positive or negative), but it
does support backtracking. Isn't backtracking what permits /.*bar/ to
match "foobar"? Without backtracking, .* would match "foobar", and
then the regexp would fail when it didn't find another "bar" after
"foobar".