Is it possible to strip everything from a text box, except that which is defined by a regular expression, on each keyUp event?
For example, I have a text box and the regex ^[a-zA-Z0-9]+$. Whenever the user enters (or pastes) characters, it will strip any characters that are not contained in that regular expression.
You could use a regexp replace with a negated character class (I also abbreviated the character, made it case insensitive, and did a global replace)
In action: http://jsfiddle.net/theprawn/GvbKY/