【发布时间】:2021-09-12 20:36:37
【问题描述】:
我有一个正则表达式:
var thisMatch = Regex.Match(result, @"(?-s).+(?=[\r\n]+The information appearing in this document)", RegexOptions.IgnoreCase);
这将返回“此文档中出现的信息”之前的行。 我的正则表达式的输出是
10 880 $10,000 $800 $25 $10
我需要提取 880,它总是在第二个位置(880 之前的数字可能不同,因此不应允许 \d{0,2})。
如何获取第二个位置编号?
【问题讨论】: