Regular expression tags on multiple lines
<p>How to extract the contents between these tags when they're on multiple/ different lines? </p>

<pre><code>&lt;link&gt;
https://widget.websta.me/rss/n/bleh
&lt;/link&gt;
</code></pre>

<p>I tried:
    content = findall('(.*)', web_page_contents, re.DOTALL)
But I get the next mention of  instead of this one^</p>

<p>You can use <code>BeautifulSoup</code> to do that. It has a very good <a href="https://www.crummy.com/software/BeautifulSoup/" rel="nofollow">documentation</a> and is very easy.</p>

<p>The following code will work:</p>

<pre><code>import requests
from bs4 import BeautifulSoup

r = requests.get(webpage_url)
soup = BeautifulSoup(r.content, 'lxml')
for link in soup.find_all('link'):
    print link.text
</code></pre>

python html regex