对字符串中包含';
$a = preg_replace("\[img\](http|https|ftp):\/\/(.[^\[]*)\[\/img\]","<img src=\"$1://$2\" border=\"0\"/>",$b);
echo $a;
?>
但是不管用?怎么替换,请指点
$a = preg_replace("\[img\](http|https|ftp):\/\/(.[^\[]*)\[\/img\]","<img src=\"$1://$2\" border=\"0\"/>",$b);
echo $a;
?>
但是不管用?怎么替换,请指点
$b= '';
$a = preg_replace("/\[img\](http|https|ftp):\/\/(.[^\[]*)\[\/img\]/","<img src=\"$1://$2\" border=\"0\"/>",$b);
echo $a;
?>
$a = preg_replace("/\[img\](.*?)\[\/img\]/","<img src=\"\${1}\" border=\"0\"/>",$b);