Check if a string starts with one letter followed by digit(s) and then any characters

Viewed 4639

How can I make the pattern below return true in scenarios like these:

m1, m1a, M100bc, s45, S396xyz

and false in scenarios like these:

'', m, 1, 1a, mm, Mx, mm1, SS1b

Pattern to tweak: /^m\S\.*/i.test(text)

Right now it takes any number of letters at the start and non-digits right after the first letter

2 Answers
Related