Last active
December 17, 2018 05:51
-
-
Save saiyerniakhil/662835261d551e64e7676a57fb03cc1b to your computer and use it in GitHub Desktop.
Python script to validate indian phone numbers
This file contains 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 | |
numregex = re.compile(r'\d\d\d\d\d\d\d\d\d\d') | |
number = input('enter your num') | |
arr = re.findall(str(number)) | |
#-----update-------- | |
if (len(arr) != 0): | |
for i in arr: | |
print(i) |
It will find all the numbers but not Indian I think ..
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very simple!