I want to match an alphanumeric string containing at least one letter and one number. Is there a simple way to combine the following into a single regular expression?
strValue.matches("[A-Z0-9]+")
&& strValue.matches(".*[A-Z].*")
&& strValue.matches(".*[0-9].*")
Use look ahead assertion.