ok, I want to search a string for the <img src="url" Anything after this> tag and replace it with [img]url[/img].
can somebody tell me the correct syntax for the pcre?
I have:
can somebody tell me the correct syntax for the pcre?
I have:
| Code: |
|
$simple_search = array( '/<img src\="(.*?)">/is' ); $simple_replace = array( '[img]$1[/img]' ); $str = preg_replace ($simple_search, $simple_replace, $str); |
