記事タグと一致するように正規表現を作成してすべてのテキストを取得しようとしています。ここで 記事タグと一致する正規表現を作成できません
は私が次Regex-<article (.*?)</article>
(?:<article>)(.*?)(?:</article>)
それらの
どれも機能していないしなさいヘルプを試してみましたこれまでの記事tag.So内にあるすべてのものを必要とするタグ -
<article id="post-82" class="post-82 post type-post status-publish format-standard hentry category-publishing">
<div class="entry-content clearfix">
<div class="abh_box abh_box_up abh_box_drop-down"><ul class="abh_tabs"> <li class="abh_about abh_active">
<p>With India playing host,</p>
<footer class="entry-meta-bar clearfix"><div class="entry-meta clearfix">
<span class="comments"><a href="http://www.test.com/blog/emerging-markets/#respond">No Comments</a></span>
</div></footer>
</article>
私の記事であります。
これは、正規表現がHTMLを解析するためのツールとして間違っているからです。あなたは完璧に動作することはありません。 HTMLパーサー(HtmlAgilityPackが動作)を使用して勝利します。 – spender