View previous topic :: View next topic |
Author |
Message |
Toasty -
Joined: 21 Feb 2008 Posts: 298 Location: Chicago, IL
|
Posted: Wed Feb 27, 2008 2:03 am Post subject: Alaphanumeric variables |
|
|
I know how to do the ([A-Z]) and ([0-9]) set ups, how do I go about making it so it reads a-z and 0-9 for each character position? Like a "default alphanumeric" reader?
Example:
http://www.mysite.com/1e5df8b2... (MD5 Checksum)
How would I make it read the whole thing...If I use ([A-Z]+) I only get letters...etc _________________ Audit the secure configuration of your server headers! |
|
Back to top |
|
|
olly86 -
Joined: 25 Apr 2003 Posts: 993 Location: Wiltshire, UK
|
Posted: Wed Feb 27, 2008 10:28 am Post subject: |
|
|
You need to use [A-z0-9]+ this tells the method to search for both upper and lower case letters, and numbers. _________________ Olly |
|
Back to top |
|
|
Toasty -
Joined: 21 Feb 2008 Posts: 298 Location: Chicago, IL
|
Posted: Wed Feb 27, 2008 3:26 pm Post subject: |
|
|
Abyss has a "Case-Sensitive" selection that I usually use (since the case isn't really going to play a factor in what I'm doing).
Thanks for the help with that! I'm sure it'll come in handy for other things too! _________________ Audit the secure configuration of your server headers! |
|
Back to top |
|
|
pkSML -
Joined: 29 May 2006 Posts: 952 Location: Michigan, USA
|
Posted: Wed Feb 27, 2008 11:21 pm Post subject: |
|
|
You could also use [\d\w] - it would allow alphabet letters (upper and lower case), digits, and the underscore.
Quote: | Since certain character classes are used often, a series of shorthand character classes are available. \d is short for [0-9].
\w stands for "word character", usually [A-Za-z0-9_]. Notice the inclusion of the underscore and digits. |
Source: http://www.regular-expressions.info/charclass.html _________________ Stephen
Need a LitlURL?
http://CodeBin.yi.org |
|
Back to top |
|
|
|