Regex to validate initials
- by iar
I'm looking for a regex to validate initials. The only format I want it to allow is:
(a capital followed by a period), and that one or more times
Valid examples:
A.
A.B.
A.B.C.
Invalid examples:
a.
a
A
A B
A B C
AB
ABC
Using The Regulator and some websites I have found the following regex, but it only allows exactly one upper (or lower!) case character followed by a period:
^[A-Z][/.]$
Basically I only need to know how to force upper case characters, and how I can repeat the validation to allow more the one occurence of an upper case character followed by a period.