Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Regex 14位的正则表达式值是多少,第8位和第9位是8_Regex - Fatal编程技术网

Regex 14位的正则表达式值是多少,第8位和第9位是8

Regex 14位的正则表达式值是多少,第8位和第9位是8,regex,Regex,如果第8位和第9位是8,我想检查14位数字 12345678812345-正确 14758638856555-正确 154543245455-错误应为以下内容: ^\d{7}88\d{5}$这假设完整的字符串是数字,否则需要另一个边界。我认为您不需要锚,但可能是?做一个消极的旁观者,还有\如果没有更详细的问题,我们永远不会知道。我明白你的意思。

如果第8位和第9位是8,我想检查14位数字

12345678812345-正确 14758638856555-正确
154543245455-错误

应为以下内容:
^\d{7}88\d{5}$

这假设完整的字符串是数字,否则需要另一个边界。我认为您不需要锚,但可能是?做一个消极的旁观者,还有\如果没有更详细的问题,我们永远不会知道。我明白你的意思。