Well, this is a bit tricky with my limited regex experience and although I've spent googling the past 30 minutes, I suspect It is easy to find a little special for this.
What I really need to do is find a string for a "Arooh Goggles - Black" "Arooh Goggles-Black" and "Airho Goggles-Black" I looked at lookhead Any help appreciated - if it matters, then it is going to be used in PHP. - character and if there is no empty space around it , it should be ' Replace with
- '. For example:
preg_replace ('/ \ s * - \s * /', '-', $ Targets);
No comments:
Post a Comment