[SATLUG] Regexp help

twistedpickles twistedpickles at gmail.com
Mon Sep 15 22:30:12 CDT 2008


Thanks I figured that. I thought that maybe escaping some how would work.
Gonna try.



::twistedPickles:: :


On Mon, Sep 15, 2008 at 10:23 PM, Channing <Channing.ML at channingc.com>wrote:

>
>
> twistedpickles wrote:
>
>> Working on mod rewrite regexp and I'm at a road block.
>>
>> My url's look like this: www.website.com/2/index.php?artist=billy%20bob
>>
>> With rewrite they now look like this: www.website.com/2/artist/billy_bob
>>
>> But last minute I decided I want them to look like this:
>> www.website.com/2/artist/billy-bob
>>
>> I can't change my mod rewrite rule to exclude the "_" because the URLs
>> have
>> already been embedded in my enhanced podcast.
>>
>> My actual regexp:
>>
>> Options +FollowSymLinks
>> RewriteEngine on
>> RewriteRule ^2/artist/([A-Za-z0-9._]*[A-Za-z0-9-._]*)$
>> /2/index.php?artist=$1 [NC]
>>
>> I'm not sure where to stick the "-" to make it work. I've tried before the
>> "." and after the "_" without success.
>>
>> Thanks for your help.
>>
>> ::twistedPickles:: :
>>
>>
> Dashes are special as they also denote a range of characters/numbers.  Try
> adding the dash as the first character within your character grouping (first
> character after the opening brace).
>
> Channing
>
> --
> _______________________________________________
> SATLUG mailing list
> SATLUG at satlug.org
> http://alamo.satlug.org/mailman/listinfo/satlug to unsubscribe
> Powered by Rackspace (www.rackspace.com)
>


More information about the SATLUG mailing list