Last active
January 4, 2020 16:42
-
-
Save eshafik/d0db778ff6f148369ca4d88434d6a394 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re | |
| text = "my phone number is 01740-999768" | |
| phoneRegex = re.compile(r"(\d{5})-(\d{6})") | |
| print(phoneRegex.search(text)) | |
| Output: | |
| <re.Match object; span=(19, 31), match='01740-999768'> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment