I am trying to do something I thought would be pretty easy to do, which is to restrict a string to certain characters by matching a regular expression.
Regex must be surrounded with /, not ', so that JavaScript creates a variable of type regex, not of type string. So for instance, for your ALPHA case, you should have
regex = /^[a-zA-Z]+$/;
See MDN's page on .match for more information about using .match.