<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_65984"> <div class="blockcode"> <div id="code_z3r"><ol> <li> <?php <li> $patterns = "/\d+/"; //第一种</li> <li> //$patterns = "/\d/"; //第二种</li> <li> $strs="left:0px;top:202px;width:90px;height:30px";</li> <li> preg_match_all($patterns,$strs,$arr);</li> <li> print_r($arr);</li> <li> </li> <li>/***************运行结果*********************/ </li> <li>//第一种</li> <li>Array</li> <li>(</li> <li> [0] => Array</li> <li> (</li> <li> [0] => 0</li> <li> [1] => 202</li> <li> [2] => 90</li> <li> [3] => 30</li> <li> )</li> <li>)</li> <li>//第二种</li> <li>Array</li> <li>(</li> <li> [0] => Array</li> <li> (</li> <li> [0] => 0</li> <li> [1] => 2</li> <li> [2] => 0</li> <li> [3] => 2</li> <li> [4] => 9</li> <li> [5] => 0</li> <li> [6] => 3</li> <li> [7] => 0</li> <li> )</li> <li>)</li> </ol></div> <em onclick="copycode($('code_z3r'));">复制代码</em> </div> <br> </td></tr></table> <div class="ptg mbm mtn"> 正则表达式</div> <div id="comment_65984" class="cm"> </div> <div id="post_rate_div_65984"></div> <br><br>