private static String toRegex(char c) {
        return switch (c) {
            case '*' -> ".*";
            case '?' -> ".";
            case '^', '$', '|', '{', '}', '(', ')', '[', ']', '\\', '+', '.' -> "\\" + c;
            default -> "" + c;
        };
    }
Converts a single string pattern char to a regex string. This method is invoked by {@link #toRegex(String)} once
for each character in the string pattern.

@param c The character to convert.
@return The corresponding regex pattern string.
messagebus/src/main/java/com/yahoo/messagebus/routing/ApplicationSpec.java