regexp
Peter L. Peres
plp-ysDPMY98cNQDDBjDh4tngg at public.gmane.org
Sat Apr 24 12:37:20 UTC 2004
Hi all, I am trying to write a regexp that matches something like:
abc=def and anything else instead of def, but not:
abc=fgh
so I try to use negation on a block (conceptually below, it is not a
correct re):
/abc=!(fgh)
and it does not seem to be possible. I read the regex[p]+ manual and I
cannot find a reference to block negation. Is this not a part of normal
regexps ? (as implemented by Hentry Spencer f.ex.) ?
References seen so far:
man 3 regex
man 7 regex
man ed
man n regexp
man n re_syntax
Mastering Regular Expressions (O'Reilly 1998 ed.)
[g]+awk book online
The closest I've come to is a negative lookahead which is not available in
regular regexps. Am I correct to say that a negative lookahead is the only
way to produce the effect I need ?
tia,
Peter
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list