regex - How do I detect space separated numbers using regular expressions in Python? -


i want extract 10 digit phone numbers text. formats of number this: 1234 567890 or 1234567890. wrote following regex:

mask = re.compile('.[\d]{4}[\s]?[\d]{6}') 

but doesn't work. how can fix this?

i think want \d{4}\s?\d{6}.

why did have . @ beginning?


Comments

Popular posts from this blog

JQuery Autocomplete without using label, value, id -

c++ - Accessing inactive union member and undefined behavior? -

JAVA - what is the difference between void and boolean methods? -