On 3/7/07, Vasile Gaburici <gaburici / cs.umd.edu> wrote:
> Basically Ruby 1.8 fails to backtrack correctly a number of regular
> expressions. The simplest one is probably:
>
> irb(main):036:0>  /a(ba|.)*?a/.match('axba')
> => nil
>
> There is more to it, and since I had to write it down for my students,
> I'm just going to link to the gory details:
> http://www.cs.umd.edu/~gaburici/rubyre.html
>
> --
> Posted via http://www.ruby-forum.com/.
>
>
I just followed the link to find this jewel:

Ruby 1.8 has a rather buggy regexp engine. Some constructs using
alternation followed by a Kleene star operator will not behave as
expected, or as they do in Python or Perl.

very funny I think

Cheers
Robert

-- 
We have not succeeded in answering all of our questions.
In fact, in some ways, we are more confused than ever.
But we feel we are confused on a higher level and about more important things.
-Anonymous