Not Operator in Regular Expressions
social.msdn.microsoft.com › Forums › en-USApr 26, 2007 · The (?! invalidates the whole match, so finding info before or after that will not occur since the match has been invalidated. I recommend that you break out the steps of this process such as 1) determine if the condition exists and if it does do what needs to be done with a separate regex(?), otherwise match what needs to be matched in a specific regex for that condition.