From: Jeff G. <je...@op...> - 2008-08-29 17:52:51
|
On Aug 29, 2008, at 1:42 PM, (private) HKS wrote: > But I'm unclear on the second. In Perl I can do this with a negative > lookahead assertion: > ^/(?!dev|proc) > > But I don't believe GNU Regexes support this. What's a GNU Regex? openNMS uses the classes from the java.util.regex package. The syntax includes much that is borrowed from Perl, and is documented here: http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html That document mentions negative lookahead, so I think that will work here. If it does, please let me know -- although I consider my own regex-fu reasonably strong, I'd never heard of negative lookahead. -jeff |