.net 正则表达式入门
简介
命名空间为:using System.Text.RegularExpressions;
案例
匹配Get访问器的属性名
var str = "b__1_0 "; var match = Regex.Match(str, "(?<=get_).*(?=>)")?.Value;
命名空间为:using System.Text.RegularExpressions;
匹配Get访问器的属性名
var str = "b__1_0 "; var match = Regex.Match(str, "(?<=get_).*(?=>)")?.Value;