Well, I want my usernames to only consist of characters and numbers... no symbols such as $%^ etc

Right now, what is two variables...

strUsername
strAsciiCode = "ABCD...abcd...1234...._-"

strAsciiCode contains all the characters that are acceptible.

I do a for loop
The pcode looks like this:

Code:
for length of username

  for length of asciicode

     check if selected character in username cooresponds to strAscii
     if it does, keep going, if not, return false

  end loop 2

end loop 1
Is there a better way of doing this? Just seems processor costly to do this... or am i really worrying about nothing?