How to know that string contains at least 2 upper case letters? For example these are valid strings \"Lazy Cat\", \"NOt very lazy cat\". Working with Java 1.7.
Try with following regex:
"^(.*?[A-Z]){2,}.*$"
or
"^(.*?[A-Z]){2,}"