Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想选择后面的数字-,在下面的例子中这个数字是034:
-
034
Dossier N° 12090343-034 Pvt du : 24/09/2012 à 17:53
我使用以下正则表达式:
Dossier[^0-9]*\K([0-9]*)(?=-)
-在这种情况下,它匹配 the 之前的第一个数字12090343,但错过了034。那么,如何搭配034呢?
12090343
-(\d+)在正则表达式的末尾添加
-(\d+)
Dossier[^0-9]*([0-9]*)-(\d+)