Alaphanumeric variables

 
Post new topic   Reply to topic    Aprelium Forum Index -> URL Rewriting
View previous topic :: View next topic  
Author Message
Toasty
-


Joined: 21 Feb 2008
Posts: 298
Location: Chicago, IL

PostPosted: Wed Feb 27, 2008 2:03 am    Post subject: Alaphanumeric variables Reply with quote

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 View user's profile Send private message Visit poster's website
olly86
-


Joined: 25 Apr 2003
Posts: 993
Location: Wiltshire, UK

PostPosted: Wed Feb 27, 2008 10:28 am    Post subject: Reply with quote

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 View user's profile Send private message
Toasty
-


Joined: 21 Feb 2008
Posts: 298
Location: Chicago, IL

PostPosted: Wed Feb 27, 2008 3:26 pm    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website
pkSML
-


Joined: 29 May 2006
Posts: 952
Location: Michigan, USA

PostPosted: Wed Feb 27, 2008 11:21 pm    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> URL Rewriting All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group