Make group of characters optional on JS regex pattern

后端 未结 0 1339
陌清茗
陌清茗 2020-12-12 01:26

Need to validate phone numbers and have been using the patterns suggested by this site

Which is as follows:

const phoneRegex = /^+(?:[0-9] ?){6,14

相关标签:
回答
  • 消灭零回复
提交回复
热议问题