javascript - Regular Expression: Allow letters, numbers, and spaces (with at least one letter not number) -
i'm using regex (/^[a-za-z0-9 _]*[a-za-z0-9][a-za-z0-9 _]*$/
) accept letters, numbers, spaces , underscores. want change takes combination of number , character not number.
if understand correctly want allow string begins @ least 1 letter , optionally followed number or underscore or space.
try this: /^(?:[a-za-z]+)(?:[a-za-z0-9 _]*)$/
@ online regex tester.
this should work.
cheers!
Comments
Post a Comment