举几个例子
一、使用捕获型()
比如0.23
1、(^d+)(.)(d{0,2})
正则表达式有3个()使用match就会产生3个分组
2、^d+.d{0,2}
没有(),不产生分组
3、分组命名
(^d+)(.)(?<XS>d{0,2})
二、非捕获型(?:)
1、(?:^d+)(.)(d{0,2})
第一个分组不再捕获
2、yu(?:d+|1)
yu123
3、yu(d+|1)