Write a program to extract the mobile number from the given string in Python


Topic: Write a program to extract the mobile number from the given string in Python

Solution

import re
string='''hello you can call me at 018002089898.'''
Phonenumber=re.compile(r'\d\d\d\d\d\d\d\d\d\d\d\d')
m=Phonenumber.search(string)
print('mobile number found from the string : ',m.group())



List all Python Programs