fork download
  1. import re
  2. m=re.match(r'^(\d{3})-(\d{3,8})$','010-12345')
  3. print(m.group(0))
  4. print(m.group(1))
  5. print(m.group(2))
  6.  
  7. # your code goes here
  8. # your code goes here
  9. # your code goes here
Success #stdin #stdout 0.13s 15532KB
stdin
Standard input is empty
stdout
010-12345
010
12345