KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I want a regular expression to extract the title from a HTML page. Currently I have this: title = re.search('<title>.*</title>', html, re.IGNORECASE).group() if title: title = title.replace('<title>', '').replace('</title>', '') Is there a regular expression to extract just the contents of <title> so I don't have to remove the tags?
Tags (comma-separated)
Save Edits
Cancel