Unique Marketing, Guaranteed Results.

Regular Expression Lookahead

June 10th, 2009 by Aaron Murphy

Using standard regular expressions is pretty easy for most tasks. However, there is one task that requires lookaheads. I am referring to using negative lookahead to check for strings that do not follow a desired match. The syntax is

(?!someregexp)

where “someregexp” is a regular expression to match. The negative lookahead will reverse the logic for you. Read the rest of this entry »


Copyright © 2005-2011 PMA Media Group. All Rights Reserved