Forum Moderators: open
// with numValue, alphaValue variables holding our input strings..
isNumeric = /^[0-9]+$/.test(numValue);
isAlpha = /^[a-z]+$/i.test(alphaValue);
[] - single character selection
^ - beginning of string
$ - end of string
+ - 1 or more of (ie [a-z]+ means: a, b, ac, aaf, etc..)
i - ignore case
Concerning the all-alpha value, this is OK for us anglos, men talar man ett annat språk, så behöver man mera bokstäver.
You might need to consider whether you need to include 'foreign' characters, not just [a-z]