From: Sebastian Hungerecker Date: 2008-02-23T04:09:56+09:00 Subject: Re: Regex in Ruby question J. Cooper wrote: > i.e. is there any problem that can't be solved without lookbehind? Yes, there are. For example: you want to match any occurence of "bar" except if it is preceeded by "foo". I.e. you'd want to match "blabar" or "oofbar", but not "foobar". You can't do that without negative lookbehind. It might be interesting to note though, that any such problem could also not be solved by a regular grammar, so "regular" expressions that need lookbehind aren't, as such, regular anymore. HTH, Sebastian -- Jabber: sepp2k@jabber.org ICQ: 205544826