gpt4 book ai didi

伊拉克电话号码的java正则表达式

转载 作者:行者123 更新时间:2023-12-02 00:08:24 26 4
gpt4 key购买 nike

我需要一个正则表达式来匹配此电话号码模式:

  • 总是以 07 开头
  • 然后后跟此范围 (3-9) 中的数字
  • 并且必须为 11 个字符

示例:07902848117

07796938209

07302819248

最佳答案

Try this, it should work.

"07[3-9][0-9]{8}"

What this mean is,
07 - it tries to find literally 07
[3-9] - then followed by 3 to 9, only one time
[0-9] - then followed by 0 to 9
{8} - text previous to this should has at least 8 characters.

关于伊拉克电话号码的java正则表达式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58140058/

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