I want to write a regex which will match a string only if the string consists of two capital letters.
I tried - [A-Z]{2}, [A-Z]{2, 2} and [A-Z][A-Z]
but these only match the string 'CAS' while I am looking to match only if the string is two capital letters like 'CA'.