try String matches(String regex)