Is it possible to know if a stream/string contains an input that could match a regular expression.
For example
String input=\"AA\";
Does Matcher.matches() not do what you want ?