gpt4 book ai didi

javascript - 正则表达式电话号码验证

转载 作者:行者123 更新时间:2023-12-01 06:58:55 25 4
gpt4 key购买 nike

我想验证格式为 +905555555555 的电话号码。

如何编写正则表达式来测试这一点?

最佳答案

one "+" and 12 numbers. hint: escape the "+".

^\+(90)\([2-5]{1}\)[0-9]{9}

或者不以+开头;

\+(90)\([2-5]{1}\)[0-9]{9}

关于javascript - 正则表达式电话号码验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5989028/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com