Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Repeated match within another regular expression
a=['starts in 09h 05m 33s','ends in 00h 33m 12s'] import re r1 = re.compile(r'(starts|ends)') r2 = re.compile(r'(\d{2})[hms]') for s in a: m1 = r1.match(s) if m1: m2 = r2.findall(s) print(m1.group(0), m2[0], m2[1], m2[2])
run
|
edit
|
history
|
help
0
LinkedList implementation
init constructor
π―π―π―π―π―π―π―π½Guess the number π½π―π―π―π―π―π―π―
Code1
Lab_III_2_01_12_2020
Game4
afw
library
linked_lists_2+decisions
Python