+ 2
Please, tell my why it gives an error "Non value for arument 'string' in function call"?
I have to check the Phone number with 1or 8 or 9 and consists of 8 digits: import re #введите код сюда matched =re.match(r'^((\d[1|8|9])\d{8})+
#x27;) if matched: print ("Valid") else: print("Invalid")8 Answers
+ 3
Acc. to ur desc, the pattern should be,
^[189]\d{7}$
+ 6
Welcome Elena Varvarchuk !
An alternative to the pattern would be using separator ( | ) which is what I guess, you were trying...
It would be,
^(1|8|9)\d{7}$
+ 3
I think you forgot to take input and pass it to match function.
re.match("Your Pattern","Input String")
So in your case
string = input()
matched = re.match(Your Pattern, string)
Hope It Helps You 😊
+ 2
спасибо) пока С# разбираю)) но по тихоньку буду приступать к питону))
+ 1
Начинай, программирование это весело)
0
i think to start object model pyton) подсказать не могу , пока ещё не начал изучать pyton 3)
0
Can somone help with the regex, all time throwing "Nonvalid"
- 1
@vrintle thank you very much!