[Solved] Regex to extract 1 letter followed by 7 numbers [closed]


You may use word boundaries. \b called word boundaries which matches between a word character and a non-word character.

\b[a-zA-Z]\d{7}\b

In js,

str.match(/\b\[a-z]\d{7}\b/i)[0]

DEMO

1

solved Regex to extract 1 letter followed by 7 numbers [closed]