ereg code needed..
Posted on 2005-05-17
Ok, here is what I need to do:
The game I play generates a unique ID for each player. This ID is 32 characters long, and contains only numbers 0-9 and letters a-f (I beleive it is an MD5 hash). A common error when entering this ID into forms is they miss letters out or use o's (O) or l's (L) instead of zeros and ones.
The missing letters is easy (strlen), but what about each letter/number? I realise I could loop through each letter/number and check it's ASCII code is within the two ranges, but is there some snazzy ereg code I can use? Or would the loop be better?