regex w domu czesc 2 trudniejsza

This commit is contained in:
B. Piatek 2020-01-24 16:18:52 +01:00
parent f4f83223e9
commit 1b6cd39dd0
2 changed files with 14 additions and 0 deletions

9
regexp/Task307.py Normal file
View File

@ -0,0 +1,9 @@
import re
def extract_phone_number(string_to_be_checked):
search = re.search("(0?61\\s\\d.\\d{3}.\\d{3})", string_to_be_checked)
if search is None:
return '<NONE>'
else:
return search.group()

5
regexp/Task329.py Normal file
View File

@ -0,0 +1,5 @@
import re
def is_singing(string):
return bool(re.match("((li|la|lo){2,})([!]*)?", string))