我想创建一个正则表达式来接收:
<p class="MyClass">
<p> something 1 </p>
<p> something 2 </p>
<span> <span> // or more html tag here
something
</p>
something's here, not in any tag!
从:
<p class="MyClass">
<p> something 1 </p>
<p> something 2 </p>
<span> <span> // or more html tag here
something
</p>
something's here, not in any tag!
<p class="MyClass">
<p> another thing 1</p>
<p> another thing 2</p>
<p> another thing 3</p>
another thing
</p>
...
我想我将使用正则表达式来匹配<p class="MyClass">
和下一个之间的所有内容。所以正则表达式是/(<p class="MyClass">[\s\S]*)<p class="MyClass">/
,在这种情况下可以正常工作。但是当我想得到这个页面的通知时它不起作用http://daotao.dut.udn.vn/sv/G_Thongbao_LopHP.aspx。DOM 这么奇怪?!
对不起,我的英语不好。