Actually, there was no syntax error in your earlier code. Reg ex : [a-z][A-Z]+ is a valid expression which will match a word in which first letter is a smaller case alphabet([a-z]) and the remaining are upper case([A-Z]+). Keep in mind anything in square brackets match one character. So, [a-z] matches one lower case character, and [A-Z]+ matches a sequence of upper case characters. Hope I helped you.