Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
How to write Python regular expression to get all the anchor tags in a webpage?
The following code extracts all tags in the given string
Example
import re rex = re.compile(r'[\<\>]') l = "this is text1 <a href='irawati.com' target='_blank'>hi</a> this is text2" print rex.findall(l)
Output
['<', '>', '<', '>']
Advertisements
