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

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -