javascript - Regex For Letters/Numbers combination -


trying come regex capture groups ab1234 or ba2321. need capture starts ab or ba , followed 4 digits.

currently, have this, seems not take numbers account

(ab|ba)\d{4} 

may want:

\b((?:ab|ba)\d{4})\b 

letters + digits in group 1


Comments

Popular posts from this blog

xml - Extract substrings with XSLT -

math - "ELO Rating" and how does "TSR Rating" work? -

How can do a tuple comparison in coffeescript similar to that in python? -