Skip to content

Instantly share code, notes, and snippets.

@saiyerniakhil
Last active December 17, 2018 05:51
Show Gist options
  • Save saiyerniakhil/662835261d551e64e7676a57fb03cc1b to your computer and use it in GitHub Desktop.
Save saiyerniakhil/662835261d551e64e7676a57fb03cc1b to your computer and use it in GitHub Desktop.
Python script to validate indian phone numbers
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)
@rajacsp
Copy link

rajacsp commented Dec 17, 2018

Very simple!

@tarunvelagala
Copy link

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