Alright, I've got the regexp
/^(.*)\s*?($OPnot|$OPor|$OPand)\s*?(.*?)$/
When I attempt to evaluate the string "blah, blah2" with it, and have $OPor = ',', $1 contains "blah", and $2 contains ",", but $3 is empty, and I would expect it to contain "blah2". Any ideas on what I'm missing here?