|negating words with Java regular expressions Raj.Ashar@jhuapl.edu (2004-07-13)|
|Re: negating words with Java regular expressions firstname.lastname@example.org (=?iso-8859-1?q?Amit=20Shanbhag?=) (2004-07-13)|
|From:||Raj.Ashar@jhuapl.edu (Raj Ashar)|
|Date:||13 Jul 2004 12:09:32 -0400|
|Posted-Date:||13 Jul 2004 12:09:32 EDT|
All, is there a way to negate words using regular expressions as
implemented by Java? I know that one can negate the characters in a
character class using the caret ([^a-z]), but I would like to build
expressions of the form:
Match ";" and not "5;".
Though one can match strings positively (as in match against string
"abc"), there does not appear to be a simple way to indicate negative
matches (do not match "abcd").
Return to the
Search the comp.compilers archives again.