I think you need to use negative lookahead: http://stackoverflow.com/questions/1749437/regular-expression-negative-looka...
(?!%)\w+\s+([\w\s]+)
Matches these:
abc (blah blah blah) dre (blah blah blah)
But doesn't match this:
dre (blah blah bl%ah)
When testing regexes, I use JSRegexTeststand: http://rentzsch.github.com/JSRegexTeststand/
On Fri, Sep 17, 2010 at 2:55 AM, Afflictedd2 flethuseo@gmail.com wrote:
Hi everyone,
I want to write regular expression that allows me to search for things like:
abc (blah blah blah) dre (blah blah blah)
but that it only does it if the line does not contain a % sign
this is what I have so far:
\w+\s+(\w+)
Any help appreciated,
Ted
-- View this message in context: http://old.nabble.com/Regular-Expression-needed-tp29734413p29734413.html Sent from the textmate users mailing list archive at Nabble.com.
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate