正则表达式 按组捕获
作者:互联网
item=live:0:9000000028
boolean boo = item.matches("^(audio:|live:|review:|aureview:)" + "(" + "2" + ":)" + "(" + "9000000000" + ")");
boo 是 false
item=live:2:9000000000
boolean boo = item.matches("^(audio:|live:|review:|aureview:)" + "(" + "2" + ":)" + "(" + "9000000000" + ")");
boo 是 true
标签:aureview,9000000000,正则表达式,捕获,matches,item,live,boo,按组 来源: https://www.cnblogs.com/f9264/p/14989774.html