繁体   English   中英

正则表达式转义逗号

[英]RegEx Escaping Comma

如何转义以下正则表达式?

Match match = Regex.Match(response.Content, @"([0-9]+)","display");

我已经尝试过转义双引号,但是逗号导致VS认为“显示”是Match方法的第三个参数。

Match match = Regex.Match(response.Content, @"([0-9]+)"",""display");

VS是对的。 Match方法已重载,但不接受3个字符串作为参数。
匹配(字符串)
Match(String,Int32)
匹配(字符串,字符串)
Match(String,Int32,Int32)
匹配(字符串,字符串,RegexOptions)
匹配(字符串,字符串,RegexOptions,TimeSpan)
希望这可以帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM