[英]Regex for specific numbers and special characters
我想从下面的输入字符串中提取值 9.6%,2021,4th 并尝试使用不同的解决方案,但没有按预期显示 output。 输入字符串: Gross Domestic Product decreased by 5.9% in volume in the fourth quarter 2021 and by 9.6% in 2021 - 4th Quarter 2021
var pattren = "^-?\\d*(\\.\\d+)?$";
var result = Regex.Match(s, pattren);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.