Dave#
07-29-2003, 11:32 AM
$newstext = strip_tags($newstext,"");
//$newstext = wordwrap( $newstext, 20 );
$newstext = preg_replace("/[a-zA-Z0-9]{12,}/s", " ", $newstext);
$newstext = ereg_replace("^http", "", $newstext);
$newstext = ereg_replace("http://", "", $newstext);
$newstext = preg_replace("/\[.*?\]/si","", $newstext);
//$newstext = preg_replace("/\[URL=.*\](.*)\[/url\]/Ui", "\\1", $newstext);
$newstext = preg_replace("/\[URL=.*\]/Ui", "", $newstext);
$newstext = ereg_replace("{bbusername}", "", $newstext);
I'm trying unsuccessfully to strip all vbcode and any urls from $newstext but failing miserably - how can I get rid of any string that contains http ?
//$newstext = wordwrap( $newstext, 20 );
$newstext = preg_replace("/[a-zA-Z0-9]{12,}/s", " ", $newstext);
$newstext = ereg_replace("^http", "", $newstext);
$newstext = ereg_replace("http://", "", $newstext);
$newstext = preg_replace("/\[.*?\]/si","", $newstext);
//$newstext = preg_replace("/\[URL=.*\](.*)\[/url\]/Ui", "\\1", $newstext);
$newstext = preg_replace("/\[URL=.*\]/Ui", "", $newstext);
$newstext = ereg_replace("{bbusername}", "", $newstext);
I'm trying unsuccessfully to strip all vbcode and any urls from $newstext but failing miserably - how can I get rid of any string that contains http ?