I have some code that is augmenting a regular expression by combining horizontal white-space and surrounding it in parentheses, unless it is already surrounded by non-backslashed parentheses. I have a piece of code that's working:
$regex_find = preg_replace('/(?<!\()[ \t]{2,}(?!\))/', '([ \t]{2,})', $regex_find);
However, for starters, the look-behind segnment, (?<!\(
), should really allow for a literal left parenthesis, \(
, but not a stand-alone left parenthesis, (
.
Thanks