I wish to remove the classes from class properties in my PHP project. The string I want to find and replace look like this: private Selector $Selector; Keep in mind that the class (in this case "Selector") is variable.
I've already tried coming up with a solution myself, however, this pattern also matches private function sendEventRelayMessage( Tracker $
find private (.*?) \$\b
replace private \$

.use[^(]or[^(\n], or just replace.*?with\S+if you only expect a single word betweenprivateand$...