Posted by mutale82 on 09/12/06 09:39
gehegeradeaus@gmail.com wrote:
> Can someone help me to make a regular expression for this sort of
> replacement :
>
> text with {link:pagehref}a link{/link}.
>
> replace to ->
>
> text with <a href="pagehref">a link</a>
>
> I tried several things but nothing seems to work... e.g.
>
> $value=preg_replace("/\{link\:(.+?)\}(.+?)\{\/link\}/s","<a href=\"$1\"
> target=\"_blank\">$2</a>",$value);
>
> Thanks in advance!
try to use str_replace() instead...
see it here: http://de.php.net/str_replace
[Back to original message]
|