Skip to content

Commit

Permalink
Basic
Browse files Browse the repository at this point in the history
  • Loading branch information
SanjanaPurbia authored Sep 6, 2021
1 parent b42d7ba commit 013f341
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions searchMobileNo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import re

s = "my name is xyz and my mobile no is +914251789799 and my mon is +911234567890"
phoneNo=re.compile(r'\+\d\d\d\d\d\d\d\d\d\d\d\d')
Mo=phoneNo.search(s)
print("Mobile no is : ",Mo) #searching only single no

Nomobile=phoneNo.findall(s) #searching all no in string
for i in Nomobile:
print("Mobile no is:",i)

0 comments on commit 013f341

Please sign in to comment.