fork download
  1. import re
  2. phoneNumRegex = re.compile(r"\d\d\d-\d\d\d-\d\d\d\d")
  3. mo = phoneNumRegex.search('My number is 415-555-4242.')
  4. print('Phone number found: '+mo.group())
Success #stdin #stdout 0.02s 27728KB
stdin
Standard input is empty
stdout
Phone number found: 415-555-4242