Skip to content

Commit f6cd2da

Browse files
committed
Regex and Parsing 4
1 parent a4226f6 commit f6cd2da

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Re.findall() & Re.finditer()
2+
# https://www.hackerrank.com/challenges/re-findall-re-finditer/problem
3+
4+
import re
5+
6+
a = re.findall(r'[QWRTYPSDFGHJKLZXCVBNMqwrtypsdfghjklzxcvbnm]([AEIOUaeiou]{2,})(?=[QWRTYPSDFGHJKLZXCVBNMqwrtypsdfghjklzxcvbnm])', input().strip())
7+
if a:
8+
for e in a: print(e)
9+
else: print(-1)

0 commit comments

Comments
 (0)