Need a Regex string to work with custom Exchange DLP "Sensitive Information" type.
i.e match on Smith but not if John Smith or Smith John
(?i)(?<!John\s)Smith appears to work for "John Smith" though I'm not convinced it is 100% efficient.
(?i)(Smith.*\s(?!John)) appears to work for "Smith John" but not if followed by a space or new line.
Have tried the following to combine them into one string but it doesn't seem to work at all.
(?i)(?<!John\s)Smith |(?i)(Smith.*\s(?!John))
(?i)(?<!John\s)Smith.*\s(?!John)
What schoolboy error am I making?