class StringHelper {

    public static int countRegexMatches(String text, String pattern) {
        Validate.notNull(pattern, "pattern must not be null");
        return countRegexMatches(text, PatternHelper.compileOrGet(pattern));
    }

    private  StringHelper();

}