Login and Register ×
Check your Email for the OTP
import re x = re.compile(r'\D') y = x.findall('Python 3') print(y)
import re x = re.compile(r'(\d\d\d)-(\d\d\d\d)') y = x.search('The phone number is 444-4444') print(y.groups())
import re x = re.compile(r'(Python){1,3}?') y = x.search('PythonPythonPython') print(y.group())
import re x = re.compile(r'(Sun)*day') y = x.findall('Today is a nice day and a Sunday') print(y)
import re x = re.compile('Day') y = x.search('Today is a nice day') print(y)
import re x = re.compile('.*', re.DOTALL) y = x.search("Today is a nice day.\n Let's go for a walk.\n We'll also go to the park.") print(y.group())
import re x = re.compile(r'(\d\d\d)-(\d\d\d\d)') y = x.search('The phone number is 444-4444') print(y.group(1))
import re x = re.compile('.*') y = x.search("Today is a nice day.\n Let's go for a walk.\n We'll also go to the park.") print(y.group())
import re x = re.compile('Day', re.I) y = x.search('Today is a nice day') print(y.group())
import re x = re.compile(r'\d') y = x.findall('The phone number is (444)-4444') print(y)