给定以下字符串
1080s: 33, 6'2" meg: test. 1748s: I THINK IM GONNA <span class="highlight" >PICK</span> 1749s: TWO COMPLETE OPPOSITES.
我想对其进行正则表达式操作,并想要以下匹配项
1st match : 1080s: 33, 6'2" meg: test.
2nd match : 1748s: I THINK IM GONNA <span class="highlight" >PICK</span>
3rd match : 1749s: TWO COMPLETE OPPOSITES.
我在 ASP.NET 中使用以下正则表达式来执行匹配
MatchCollection mcs = Regex.Matches(txtData, "(\\d*)(s:)([^(\\d*)](s:){0})*");
正则表达式将匹配,但捕获不正确。\d*
正则表达式一找到或就跳过文本s:
。\d*s:
当且仅当一起找到时,我希望它跳过。
我尝试了几种不同的方法,但仍然没有找到如何在 not 运算符中结合\d*
两者s:
。