public static final String INVALID_CHARACTERS = "^#%<>{}|"; private static final Pattern INVALID_PATTERN = Pattern.compile("["+Pattern.escape(INVALID_CHARACTERS)+"]"); public static boolean containsInvalidCharacters(String input) { return input != null && INVALID_PATTERN.matcher(input).find(); }
private int single() { int ch = peek(); switch (ch) { case '\\': return escape(true, false); default: next(); return ch; } }
private int single() { int ch = peek(); switch (ch) { case '\\': return escape(true, false); default: next(); return ch; } }
} else { // ordinary escape unread(); ch = escape(true, true); if (ch == -1) return (CharProperty) root;
} else { // ordinary escape unread(); ch = escape(true, true); if (ch == -1) return (CharProperty) root;
ch = escape(false, first == 0); if (ch >= 0) { append(ch, first);
ch = escape(false, first == 0); if (ch >= 0) { append(ch, first);