How can I adjust the pattern below to return true
in cases like these:
m1
, m1a
, M100bc
, s45
, S396xyz
and return false
in cases like these:
''
, m
, 1
, 1a
, mm
, Mx
, mm1
, SS1b
The current pattern is: /^m\S\.*/i.test(text)
Currently, it matches any number of letters at the start and non-digits right after the first letter