Page 1 of 1

find my error....

Posted: Thu Feb 19, 2004 9:49 pm
by Illusionist
Oops, after i posted, i noticed iw as int he wrong forum! Sorry!

im having more problems with my regular expressions...

Code: Select all

$search = "#<a href="(http://)?(.*?[^ "\n\r\t<]*?)" target="_self">(.*?)</a>#is";
	$replace  = "[link=\\1\\2]\\3[/link]";
	$text = preg_replace($search, $repalce, $text);
I'm new to reg exp so be easy with me!

FOUND the problem, wronge variable name: $repalce in the preg_replace