1
我想使用正則表達式提取表格的內容。使用正則表達式解析HTML表格
我已經從表中刪除了大部分標籤,我被卡住了<br> , <a href >, <img > & <b>
如何刪除它們?
爲<b>
標籤我想這正則表達式
\s*<b[^>]*>\s*
(?<value>.*?)
\s* </b>\s*
它的工作對一些線條和它的一些給予了把儘可能
<b class="saadirheader">Email:</b>
誰能幫助我消除這些標籤
<br> , <a href >, <img > and <b>
完整標籤: -
<img src="Newrecord_files/spacer.gif" alt="" border="0" height="1" width="5">
<a href="mailto:[email protected]">
感謝你,
納文HS
您是否已經知道['strip_tags'](http://php.net/strip_tags)? – Gumbo 2010-07-30 09:48:07
此外,強制性鏈接:http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454 – Amadan 2010-07-30 09:49:29
您可能還想了解貪婪和不貪婪的表達。即在 vs ] *> –
relet
2010-07-30 09:52:52