phpbar.de logo

Mailinglisten-Archive

[php] Frage zu preg_replace

[php] Frage zu preg_replace

Christian Kruse php_(at)_phpcenter.de
Fri, 4 May 2001 10:42:17 +0200


Hi,

On Fri, 4 May 2001 10:34:42 +0200
Frank.Schreiber_(at)_lr-online.de wrote:

> $str = preg_replace("/\[www([^\]]+)\]/","<a href=\"\\1\">1</a>", $str);
$str = preg_replace("!www\.([^\s]+)!","<a href='http://www.\\1'>www.\\1</a>",$str);

Gruss,
 Christian


php::bar PHP Wiki   -   Listenarchive