in reply to negative lookaheads doing my 'ead in
The (?!<=) means that the stuff preceeding it mustn't be followed by '<='. Your example is, so it doesn't match. Remove either or both chars or change one or both to something else and it will match.
/ ^ # start of line \s* # optional whitespace (?!for all) # NOT "for all" (\w+) # One or more word chars \s* # optional whitespace : # a colon \s* # more optional whitespace (\w+) # another set of one or more word chars \s* # and more optional whitespace (?!<=) # NOT followed by the char sequence '<=' /i
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: negative lookaheads doing my 'ead in
by Anonymous Monk on Nov 08, 2002 at 11:24 UTC | |
by BrowserUk (Patriarch) on Nov 08, 2002 at 11:42 UTC |