0

phone number validation quiz problem

test #3 not correct and locked https://code.sololearn.com/cbqLGsFN729I/?ref=app

7th Feb 2021, 10:02 AM
Um Yusuf
Um Yusuf - avatar
3 Answers
+ 5
# try: pattern = r"^[189]\d{7}
quot; # $ symbolize end of string # [ ] regex class expect list of char (no separators)
7th Feb 2021, 10:20 AM
visph
visph - avatar
+ 1
Post your CODE First Please. We would help then afterwards. Posting link would not let us see what you did, but open our own solution.
7th Feb 2021, 10:04 AM
Ezra Bridger 2207 [INACTIVE]
Ezra Bridger 2207 [INACTIVE] - avatar
0
import re #your code goes here pattern= r"^[1,8,9]\d{7}" phon=input() if re.match(pattern,phon): print("Valid") else: print("Invalid")
7th Feb 2021, 10:05 AM
Um Yusuf
Um Yusuf - avatar