Thanks. 

I'm using it in ISAPI-ReWrite to rewrite URLs. Although it works in the 
built-in regex tester (which is handy) it's not working on the server:

RewriteRule (^/[\w-]+/$) index.cfm\?name=$1 [NC,L]

Could be something else I think.  I'm working with the support guy.

Mik


At 01:29 PM 1/25/2010, you wrote:

>The only punctuation that \w matches is underscore.
>
>To match hyphen also, use [\w-], which then gives the expression "/[\w-]+/"
>
>(To match hyphen but not underscore [a-zA-Z0-9-] is what you want)
>
>NOTE: The hyphen must be first/last in the class, or be escaped with a 
>backslash.
>
>To specifically ignore "/images/filename.jpg" you need to ensure the second 
>slash is at the end of the string, (and the opening slash at the start), so 
>use:
>
>"^/[\w-]+/$" 
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330131
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to