How To Check For [a-z] In String?

Hank Kingwood hank at bogusaddress.xyz
Thu Oct 2 10:48:42 EDT 2003


This is probably an easy question, but I can't find a function (maybe my 
syntax is off...) to search for [a-z] in a string.  If someone would 
help out, I'd appreciate it!

Also, how would you recommend searching for the following in the same 
string:
   [a-z]
   [A-Z]
   [0-9]
   -

My approach would be to perform four separte checks, but I'm thinking 
there might be some cool approach that would use a dictionary or array. 
  Ideas?

Thanks,
Hank





More information about the Python-list mailing list