java 自己写了一个正则怎么都验证不到getcol 开头后面跟 3个任意字符,(xx)这样的字符
String str = "798>getcolsum(fmoney)>getcolavg(fmoney)";
String pattern = "getcol[\\w]{3}\\([\\w.]*\\)";
Pattern r = Pattern.compile(pattern);
Matcher m = r.matcher(str);
System.out.println(m.matches());
这个表达式应该怎么写?