Jump to content

preg_replace and ereg


Crusader

Recommended Posts

I'm trying to figure out a way to change something like this:

 

[url]http://wordToFind.tld/agawgaw11/agwgag/stuff[/url]

 

into this:

 

[hide][url]http://wordToFind.tld/agawgaw11/agwgag/stuff[/url][/hide]

 

It should search for a specific word, e.g. "wordToFind," in a string but edit the entire string rather than the word. How would I go abouts doing that?

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/70776-preg_replace-and-ereg/
Share on other sites

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.