Regex has been the most popular and easiest way of writing validations. The only big problem with regex has been the cryptic syntax. Developers who are working on projects with complicated validation always refer some kind of cheat sheet to remember the syntaxes and commands.

Regex has been the most popular and easiest way of writing validations. The only big problem with regex has been the cryptic syntax. Developers who are working on projects with complicated validation always refer some kind of cheat sheet to remember the syntaxes and commands. In this article we will try to understand what regex is and how to remember those cryptic syntaxes easily.

In the previous question the regex validator will only validate first 3 characters of the invoice number if it is in small letters. If you put capital letters it will show as invalid. To ensure that the first 3 letters are case insensitive we need to use ^[a-zA-Z]{3} for character validation.