private static void validateName(String name) {
        Matcher nameMatcher = namePattern.matcher(name);
        if ( ! nameMatcher.matches())
            throw new IllegalArgumentException("Illegal name '" + name + "'");
    }
Throws IllegalArgumentException if the given string is not a valid query profile name
container-search/src/main/java/com/yahoo/search/query/profile/compiled/CompiledQueryProfile.java