don't use regex to parse html - plain and simple.
obviously this is some
part1
obviously this is some
<a>
tag. so using BeautifulSoupfrom bs4 import BeautifulSoup html = '''<a href="https://newjersey.craigslist.orgparlin-chevrolet-colorado-call/7014860327.html"> <span class="result-price">$18000</span> </a>''' soup = BeautifulSoup(html, 'html.parser') a_tag = soup.find('a') print(a_tag.get('href'))also look at our tutorial:
part1
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs