有人可以幫我理解這個程序如何計算下面給出的輸出嗎?正則表達式(正則表達式)模式匹配
import java.util.regex.*;
class Demo{
public static void main(String args[]) {
String name = "abc0x12bxab0X123dpabcq0x3423arcbae0xgfaaagrbcc";
Pattern p = Pattern.compile("[a-c][abc][bca]");
Matcher m = p.matcher(name);
while(m.find()) {
System.out.println(m.start()+"\t"+m.group());
}
}
}
OUTPUT:
0 abc
18 abc
30 cba
38 aaa
43 bcc