phone number validation quiz problem | SoloLearn: Learn to code for FREE!

0

phone number validation quiz problem

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

2/7/2021 10:02:39 AM

Um Yusuf

3 Answers

New Answer

+5

# try: pattern = r"^[189]\d{7}$" # $ symbolize end of string # [ ] regex class expect list of char (no separators)

+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.

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")