+ 2
Some regex help please
Can someone give me a regex string in java That will be matched by phone numbers of format 000.000.0000 and 000-000-0000 alone
2 odpowiedzi
+ 2
Pete Wright your program is wonderful, i was just trying to see how others will approach the problem
Check my program out and make sure you read the comments
https://code.sololearn.com/cGNrrd7lTVI6/?ref=app
0
Mind To Machine 💻🕆
I am not sure about the Java Syntax but the Regex pattern should look like this one:
/^(\d{3}[-]{1}\d{3}[-]{1}\d{4}|\d{3}[\.]{1}\d{3}[\.]{1}\d{4})$/gi
Check my code:
https://code.sololearn.com/WP5NgJbhE7KM/?ref=app