your character classes are only set to match a string of 3 characters
try: ^[a-zA-Z0-9]+$
but further to that, you should really consider using the PCRE regex functions. They're the defacto standard. Shoud that be the case, you'd want something with delimiters:
I'm currently reading through chapters on regex in my books at the minute. I always chose not to read about it because I found regex scary and thought it was more of a choice thing to learn. But from the past 30 minutes I've been reading about it seems pretty cool and not as scary as I once thought it looked.