Python: Difference between revisions
Line 178: | Line 178: | ||
import re | import re | ||
my_regex = re.compile(r'height:(\d+)cm') | my_regex = re.compile(r'height:(\d+)cm') | ||
my_match = | my_match = my_regex.match("height:33cm"); | ||
print(my_match[1]) | print(my_match[1]) | ||
# 33 | # 33 |