Hi,

Am Mittwoch, 13. Dez 2006, 19:28:08 +0900 schrieb benjohn / fysh.org:
> > I would appreciate if there were a general pattern looking to the left
> > corresponding to (?=re) what is non-consuming to the right.
> 
> The book I'm reading (o'reilly pocket reference) hints at the look
> arround constructs being:
> 
>   (?=...) - look ahead.
>   (?!...) - negated look ahead.
>   (?<=...) - look behind.
>   (?<!...) - negated look behind.

The latter two don't work in Ruby as far as I know.

  irb(main):001:0> "hello" =~ /(?<=e)ll/
  SyntaxError: compile error
  (irb):1: undefined (?...) sequence: /(?<=e)ll/
          from (irb):1


Bertram


-- 
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de