Looking for a bit of regex help. I\'d like to design an expression that matches a string with \"foo\" OR \"bar\", but not both \"foo\" AND \"b
You might want to consider the ? conditional test.
(?(?=regex)then|else)
Regular Expression Conditionals