make characters optional in regular expression

前端 未结 3 1589
执笔经年
执笔经年 2020-12-18 19:04

I am trying to validate a (US) phone number with no extra characters in it. so the format is 1-555-555-5555 with no dashes, spaces, etc and the 1 is optional. However, my

3条回答
提交回复
热议问题