public static int countRegex(String text, String pattern) {
Pattern p = Pattern.compile(pattern);
Matcher m = p.matcher(text);
public static int countRegex(String text, String pattern) {
Pattern p = Pattern.compile(pattern);
Matcher m = p.matcher(text);