|
|
Browse by Tags
All Tags » php » preg_replace
-
Hi,
Anybody knows how to replace the second or third instance of word in a text using regular expression in php (preg_replace())
For example, I have an article about car and let's say the word car occurs 10 times. Now I want to replace the 3rd and 7th instance
of car with some other word. How can I do this with php regular ...
-
Hi, I asking for help in my PHP code optimization. I try to rewrite my old/slow BBCode conversion function to use regex. The allowed BBCodes are
[ b]text[ /b]
[ i]text[ /i]
[ url]domain.com[ /url] or [ url]domain.com|domainname[ /url]
[ img]filename.ext[ /img] or [ img]filename.ext|description[ /img]
It is possible to construct ...
|
|
|