Tuesday, 15 April 2014

regex - How to check in Javascript that a string contains alphabetical characters -



regex - How to check in Javascript that a string contains alphabetical characters -

i wanted check string value if containing letter/s [a-za-z]

example:

var str = '123z56';

no jquery needed

if (str.match(/[a-z]/i)) { // alphabet letters found }

javascript regex

No comments:

Post a Comment