mardi 11 octobre 2022

RegEx pattern - length 7, first character letter and second numeric third character letter remaining numeric [duplicate]

I am trying to create a RegEx to match a string with the following criterion

  • Length 7
  • First character is a letter, second one is a number and 3rd character is a letter and afterwards the remaining 4 characters remaining numbers.

Examples

A0M8997
B0M9998
g8j8989

I have tried this code. but it's not working

/[A-Za-z]{1}[0-9]{1}[A-Za-z]{1}[0-9]/

Aucun commentaire:

Enregistrer un commentaire