Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/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
使用regexp获取子字符串的模式是什么_Regex - Fatal编程技术网

使用regexp获取子字符串的模式是什么

使用regexp获取子字符串的模式是什么,regex,Regex,我有以下两个字符串,如何获取其中的数字?即233100和233800 QA-Ki-233100 QA-Ki-233800-win-vc8-x86-release 这是我的模式,但不是工作 oRegexp.Pattern = "QA-Ki-\--[\Z]" 谢谢您的帮助。这应该可以: (?<=-)\d+(?=-|$) 在(?您使用哪种语言)中,这非常有用。 \b\d+\b

我有以下两个字符串,如何获取其中的数字?即233100和233800

QA-Ki-233100
QA-Ki-233800-win-vc8-x86-release
这是我的模式,但不是工作

oRegexp.Pattern = "QA-Ki-\--[\Z]"
谢谢您的帮助。

这应该可以:

(?<=-)\d+(?=-|$)

(?您使用哪种语言)中,这非常有用。
\b\d+\b