0

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

  • 它总是以 07 开头
  • 然后是这个范围内的数字(3-9)
  • 它必须是 11 个字符

示例:07902848117

07796938209

07302819248

4

1 回答 1

0
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.
于 2019-09-27T18:58:24.137 回答