Skip to content

Commit 821a8b6

Browse files
committed
added detect-html-link
1 parent 5596465 commit 821a8b6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

hackerrank/regex/detect-html-links.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"""
2+
https://www.hackerrank.com/challenges/detect-html-links/problem
3+
"""
4+
5+
import re
6+
7+
p = re.compile('<a href="(.*?)".*?>\s?([\w ,./]*?)\s?(?=</)')
8+
9+
for _ in range(int(input())):
10+
m = p.findall(input())
11+
for l,t in m:
12+
print('{},{}'.format(l,t))

0 commit comments

Comments
 (0)