This a very simple tasks. Try this:
^[A-Z]{2}-\d{2}-[A-Z]{2}-\d{4}$
- The
[A-Z]means the capital alphabet characters. - The
\dmeans digits. - The numbers between curved brackets
{..}means how many times the preceding should be repeated. - The
^means the beginning of the string and the$means the end of it.
1
solved Javascript regular expression for vehicle number [closed]