Regular expression: match all words except

In PHP, using preg_replacehow I can write a regular expression to exclude any phrase except “The” in parentheses and the preceding space. For instance.

Concordia University (Anything But The) => Concordia University
American University (The) => American University (The)
+5
source share
1 answer

Does preg_replacenegative image support ? If so, you can do something like this ...

\((?!The\)).*?\)

+6
source

All Articles