Sebastian Hungerecker
2/22/2008 7:10:00 PM
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