Re: Search Engine Safe/Friendly URLS

2008-03-28 Thread Tom Chiverton
On Friday 28 Mar 2008, Nate Willard wrote: cfset newUrl = reReplaceNoCase(arguments.theString, \W, -, ALL) But that results in Who-watched-Jay-Leno-s-Show--Last-Night-- cfset newUrl = reReplaceNoCase(arguments.theString, [^a-zA-Z0-9], -, ALL) i.e. turn everything that isn't letter or number

Re: Search Engine Safe/Friendly URLS

2008-03-28 Thread exH
Subject: Re: Search Engine Safe/Friendly URLS On Friday 28 Mar 2008, Nate Willard wrote: cfset newUrl = reReplaceNoCase(arguments.theString, \W, -, ALL) But that results in Who-watched-Jay-Leno-s-Show--Last-Night-- cfset newUrl = reReplaceNoCase(arguments.theString, [^a-zA-Z0-9], -, ALL

Re: Search Engine Safe/Friendly URLS

2008-03-28 Thread Tom Chiverton
On Friday 28 Mar 2008, exH wrote: With a plus on the end [^a-zA-Z0-9]+ Ahh, yes. May or may not be what the OP wants, but I think your's works better. -- Tom Chiverton Helping to quickly generate visionary designs on: http://thefalken.livejournal.com

Re: Search Engine Safe/Friendly URLS

2008-03-28 Thread Nate Willard
But that would turn Blah is the movie's ending's into : blah-is-the-movie-s-ending-s right? It doesn't handle punctuation? Tom Chiverton [EMAIL PROTECTED] wrote: On Friday 28 Mar 2008, exH wrote: With a plus on the end [^a-zA-Z0-9]+ Ahh, yes. May or may not be what the OP wants, but I think

Re: Search Engine Safe/Friendly URLS

2008-03-28 Thread Tom Chiverton
On Friday 28 Mar 2008, Nate Willard wrote: But that would turn Blah is the movie's ending's into : blah-is-the-movie-s-ending-s right? It doesn't handle punctuation? It does what it says on the tin :-) If you want to remove all the ' first, just replace() them into nothing then do the reg.

RE: Search Engine Safe/Friendly URLS

2008-03-28 Thread Bobby Hartsfield
Id just do it with 2 [^a-z0-9] with nothing Then spaces with _ -Original Message- From: Tom Chiverton [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2008 12:54 PM To: CF-Talk Subject: Re: Search Engine Safe/Friendly URLS On Friday 28 Mar 2008, Nate Willard wrote: But that would

Re: Search Engine Safe/Friendly URLS

2008-03-28 Thread Nate Willard
I'm trying to use the following: cfset newtitle = reReplaceNoCase(newtitle, \W, -, ALL) The problem with the above is the following string microsoft-yahoo is turned into microsoft--yahoo adding another dash... Is there a way to add a negative or escape to the code above so dashes aren't

Search Engine Safe/Friendly URLS

2008-03-27 Thread Nate Willard
I'm working to turn the follow below into a friendly URL. Who watched Jay Leno's Show [Last Night] I tried using: cfset newUrl = reReplaceNoCase(arguments.theString, \W, -, ALL) But that results in Who-watched-Jay-Leno-s-Show--Last-Night-- Is there a regex that can do this task in a way to