Apr-23-2019, 04:47 AM
Hello,
I am trying to do the exercise on regex, matching 3 telephone numbers i a row, with or without area code, with or without comma at the end:
I am trying to do the exercise on regex, matching 3 telephone numbers i a row, with or without area code, with or without comma at the end:
>>> phoneRegex = re.compile(r'((\d\d\d-)?\d\d\d-\d\d\d\d(,)?) {3}') >>> mo = phoneRegex.search('my numbers are 415-555-1234, 555-4242, 212-555-0000')This is not matching. And I cannot figure out why.