php最小匹配用问号不管用?
- PHP code
<!---ecms Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><?php $strr="<textarea>abc</textarea>asdfasdf<textarea>def</textarea>"; $search="/<textarea>(.*)<\/textarea>?/is"; preg_match_all($search,$strr,$m_arr); print_r($m_arr);?>
这段代码,怎样实现,匹配出2个
- HTML code
<!---ecms Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> Array( [0] <a style="color:transparent">来@源gao*daima.com搞@代#码网</a><strong>搞gaodaima代码</strong>=> Array ( [0] => <textarea>abc</textarea>asdfasdf<textarea>def</textarea> ) [1] => Array ( [0] => abc</textarea>asdfasdf<textarea>def ) )
2个textarea只匹配成一个了。我那个正则应该怎样修改?
非常感谢!
——解决方案——————–
$search=”/