terrible syntax
Showing posts with label
regular expressions
.
Show all posts
Showing posts with label
regular expressions
.
Show all posts
Saturday, November 12, 2011
match a word as long as another word doesn't appear before it
match 'haha' as long as 'example' doesn't come first
/^((?:(?!example).)*)(haha.*)$/
excellent post about *not* matching a word: http://stackoverflow.com/questions/406230/regular-expression-to-match-string-not-containing-a-word
Older Posts
Home
Subscribe to:
Posts (Atom)