Jump to content

replace more than one character


web_master

Recommended Posts

There is no simple method for doing this with a single pattern, this is not really what Regex is designed for. The easiest option would be to use an array of patterns/replacements. Since the pattern and replacement are fixed however you might be as well to simple use str_replace with an array of patterns and replacements.

There is no simple method for doing this with a single pattern, this is not really what Regex is designed for. The easiest option would be to use an array of patterns/replacements. Since the pattern and replacement are fixed however you might be as well to simple use str_replace with an array of patterns and replacements.

 

So, this is the problem, that I dont know how can I do that - Ill try the simple str_replace ... but it dont work, but I don't know how can I do that with array ... :(

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.