Thanks for the explanation, Denny!

Rick

> -----Original Message-----
> From: denstar [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 13, 2008 4:04 AM
> To: CF-Talk
> Subject: Re: Creating a .cfm file on the fly
> 
> On Wed, Mar 12, 2008 at 7:27 PM, Rick Faircloth
> <[EMAIL PROTECTED]> wrote:
> > Thanks, Denny...
> >
> >  I read recently that dashes "-" in filenames were more
> >  search engine friendly than underscores.  If I were to want to
> >  disallow underscores and allow dashes, how would the regex change?
> 
> You can just replace the "_" with the "-", in that expression.
> 
> It's a good learner expression, actually:
> 
> Those "|" pipes mean that the stuff 'tween them is optional.
> 
> The "^" at the front is special, means "exclusion" or something, I think. :]
> 
> The "set" is everything between the "[" and "]" --
> 
> A-Z == All upper case apha letters.  a-z is all lower, although
> usually you can do A-z, I think, to get both.
> 0-9 == all digits between 0 and 9.
> 
> If you want to add an asterisk, the general idea would be:
> [^a-z|A-Z|0-9|_|*].  And an asterix and a 'sclamation? :
> [^a-z|A-Z|0-9|_|*|!].
> 
> Generally you need to escape certain chars, like the "*" or the bang,
> but within sets [things] are different.
> 
> There are various flavors of regex engines, and not all the same stuff
> works the same across the board, but they can be really useful-- this
> is one of my favorites, because you're automatically disallowing
> anything you didn't specifically add 'tween those "|"s.
> 
> Not especially CF related, I know.  And maybe not exactly accurate--
> but regular expressions are just so darn cool.  Figured I'd give
> giving a little detail a shot.
> 




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301160
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