正则问题求教
我想把字符串中的title内容找出来,该怎么弄来4源gaodaimacom搞#代%码*网搞代gaodaima码
?下面code是我写得,但不行..
- PHP code
<!---ecms Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><?php$regex='/<title>[\s\S]*?</title>/';$str='aaa<title>bbbbbb</title>ccccccccc';$result=array();preg_match($regex,$str,$result);print_r($result);?>
——解决方案——————–
$regex=’/
——解决方案——————–
$regex=’/