Regular expression to match exact number of characters? January 17, 2023 by Tarik What you have is correct, but this is more consice: ^[A-Z]{3}$