note 9751 added to eregi_replace

From: Date: Wed, 22 Nov 2000 01:33:32 +0000
Subject: note 9751 added to eregi_replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-7971@lists.php.net to get a copy of this message
This is to convert http://x.y.z/anyfile.php?param=value into <a href='http://x.y.z/anyfile.php?param=value'>http://x.y.z/anyfile.php?param=value</a> <? $url = "<HTML><BODY>http://www.al-e_x.com/wh_at.php?what=2123123123<BR> ftp://www.al-e_x.com/wh_at.php?what=2123123123<I> mailto://alex@what_who_where-xyz.com</BODY></HTML>"; $url = eregi_replace( "((http|mailto|ftp):\/\/[^[:space:]<>]{1,})", "<a href='\\1'>\\1</a>",$url); print $url; ?> LexZEUS http://www.php.net/manual/function.eregi-replace.php

« previous php.notes (#7971) next »