我希望匹配< div class =" post_body"中的所有内容id =" pid _">< / div> 标签...我需要解析的内容如下所示。
<tr>
<td class="trow2 post_content ">
<div class="post_body" id="pid_">
This is <span style="font-style: italic;">just a test</span> message.<br />
With an image.<br />
[img]http://www.somesite.com/wp-content/something.jpg[/img]<br />
Blah blah <span style="font-weight: bold;">blah</span>.<br />
<br />
The quick brown fox jumps over the lazy <span style="text-decoration: underline;">dawg</span>.<br />
<br />
[video=youtube]http://www.youtube.com/watch?v=MbYZa4gTxzM[/video]<br />
<br />
<a href="mailto:test@test.com">asd</a><br />
<ul>
<li>item number 1</li>
<li>item nubmer 2<br />
</li></ul>
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #66CCFF"><?php </span><span style="color: #7AC07C">echo </span><span style="color: #FF99FF">'hello world'</span><span style="color: #7AC07C">; </span><span style="color: #66CCFF">?></span></code></div></div></div>
<br />
<div style="text-align: center;">i am centered.</div>
<div style="text-align: right;">i am not centered.</div>
</div>
<div class="post_meta" id="post_meta_">
</div>
</td>
</tr>
正如您所看到的,我故意在标签之间添加了大量内容。这是我需要帮助的部分。考虑到其他标签的存在,我如何检测上面指定的两个标签的内部。
这是在Flash Builder上的AS3中完成的。