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 »


