Question mark is not used for php minimum matching? PHPcode & lt ;? Php $ strr & quot; & lt; textarea & gt; abc & lt; textarea & gt; asdfasdf & lt; textarea & gt; def & lt; textarea & gt; & quot; $ search & quot; & lt; textarea & gt; question mark (?) is used for php minimum matching?
PHP code
AbcAsdfasdfDef"; $ Search = "/(. *) <\/Textarea>? /Is "; preg_match_all ($ search, $ strr, $ m_arr); print_r ($ m_arr);?> </Pre> </dl> <br/> How to implement this code and match two <textarea>? <Br/> The matching result is: <br/> <dl class = 'code'> HTML code <pre> <! -- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/--> Array ([0] => Array ([0] => <textarea> abcAsdfasdfDef) [1] => Array ([0] => abcAsdfasdfDef) </pre> </dl>
The two textarea match only one. How should I modify my regular expression?
Thank you very much!
------ Solution --------------------
$ Search = "/(. *) <\/Textarea>/iUs ";
------ Solution --------------------
$ Search = "/(.*?) <\/Textarea>/iUs ";
------ Solution --------------------
$ Search = "/(.*?) <\/Textarea>/is ";
------ Solution --------------------
$ Search = "/(.*?) <\/Textarea>/is "; many upstairs solutions ......? Followed by * is the minimum matching, not the last side.