nobu.nokada / softhome.net wrote:

> Hi,

Moin!

> Ruby 1.9 (Oniguruma) has look-behind feature.
> 
>   $ ruby -v -e 'p "bab".gsub(/(?<!a)ab/, "cd")'
>   ruby 1.9.0 (2004-05-12) [i686-linux]
>   "bcd"

Very nice. Does this work too?

ruby -v -e 'p "bab\nbcab".gsub(/^(?<!bc?)ab$/, "cd")'

(I would expect it to produce "bcd\nbccd".)

Regards,
Florian Gross