文档介绍:C# Regex 深入正则表达式
匹配字符串——从一段数据中提取自己所需要的数据信息
Regex regex = new Regex(正则表达式);
Regex regex = new Regex(正则表达式, | | );
//None 无;IgnoreCase能够在匹配是忽略大小写;Multiline调整^和$的意义,改为匹配一行的开头和结尾
Match m = (内容字符串);   //取一个符合条件的值
(());  //获得结果
Match matchs = (内容字符串);  //取多个符合条件的值(数组)
foreach(Match m in atchs){         
    (());   //遍历获取结果
 }
();                 //数组长度
--------------------------------------------------------------------------------
组的概念——当获的数据信息是组结构时,可用它来获取
Regex regex = new Regex(@"(d+)/(d+)");
Match matchs = (@"最后比分是:19/24");
foreach(Match m in matchs)
{
  foreach(string name in ())     //组的概念
    {
       (("capture group"{0}"value is:"{1}"",,name,[name].Value);
    }
}
输出:
capture group"0"value is:"19/24"
capture group"1"value is:"19"
capture group"1"value is:"24"
附:用@"(?<score1>d+)/(?<score2>d+)"替代@"(d+)/(d+)"看看结果
--------------------------------------------------------------------------------
替换字符串
Regex regex = new Regex(expression, option);
string result = (str1,str2);
//str1为原字符串;str2为替换内容,它可以包含以下一些特殊字符串,用来代表特别意义
$& 匹配的字符串,也可以用$0
$1, $2, . . . 匹配字符串中的对应组,用索引标示
${name} 匹配字符串中的对应组,用名称标示
$‘匹配位置之前的字符串
$’匹配位置之后