0
Solve this regex in shell script
Accept a string and return True if it is in the form of following phone number. (123) 456-7890 where the number can be any [0-9]
1 Resposta
0
off hand I believe its (r'(\d{3})\s\d{3}-\d{4}')
r is the regulator expression, then in quotes, then open perens, \d{3} says 3 numbers only, \s is a space... with that you should understand the rest. However you may need a \w instead of each parentheses... I did not check this code.