I would like to make regular expression so it matches only value as bellow, but I want to make it so you have to have at least one (i know it works with the "+" symbol) a-z letter, but I don't know where to put the "+" to make it work correctly. Any help on this?
.match(/^[0-9a-z]{3,10}$/i)
Edit: It should match for string like "12a", but it shouldn't match for "123" cause it has to have at least one a-z in it.
if( ! ($Username.match(/^[0-9a-z]{3,10}$/i) && $Username.match(/[a-z]/i)) ) {
return false;
}
Edit: Thanks to Felix now the example code above works perfect.
$Username.match(/[a-z]/i).a-zmust be in a character class, otherwise it matches a-z literally.