How to extract paragraph using regular expression


Before thanks for great tool :)

I have question how to extract all contents from paragraph, for example:

<div class=description>
<p> paragraph 1 </p>
<p> paragraph 2 </p>
<p> paragraph 3 </p>

I use simple regex  <div class=description> <p>([^<]+) , But only get first paragraph. Please advice


If you want complete description, use this regular expression (.*?) It will extract everything between the given tags.

Example usage

<div class=description>(.*?)</div>

regex tester in website scraping

Your Answer

Close me