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. As far as preference with the search engines? I seriously doubt that much of that goes on-- you gotta think, the more stuff they index, the better it is for them, right? At least for dashes or underscores, it would seem silly, but I don't have any hard data. Seems like a lot of stuff goes by link "weight" (number of other links that link to it, or something) more than the actual href. Eh. Search ranking has only been important to me once, so... not the most versed in that particular dark art :] -Denny -- "I must not fear. Fear is the mind-killer. Fear is the little-death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the fear has gone there will be nothing. Only I will remain." --- Frank Herbert, Dune - Bene Gesserit Litany Against Fear ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:301147 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

