-1
$string ='<p>Jane has: {num1} times <img alt="" src="/ckfinder/userfiles/images/shapes/button4.jpg" style="height:59px; width:60px" /></p>
<p>Her Father gives her: {num2} times <img alt="" src="/ckfinder/userfiles/images/shapes/button4.jpg" style="height:59px; width:60px" /></p>
<p> </p>
<p>Total No of Buttons She Have: ans</p>
<p> </p>
<p> </p>
';
在此字符串的正则表达式我要提取这两行:查找类似字符串
- 简有:{NUM1}次
- 她的父亲给她:{NUM2}倍
另外,我需要提取不马赫两个字符串的字符串。
你有没有尝试过任何东西呢?也许类似'。* \ {num \ d + \}。*'? – sp00m 2013-03-27 08:50:56