House of Fusion
Home of the ColdFusion Community
Hostmysite ColdFusion Hosting

Search cf-talk

May 09, 2008

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
         1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31


For ColdFusion hosting try HostMySite.com.
Search over 2,500 ColdFusion resources here  >>>      
Home /  Groups /  ColdFusion Talk (CF-Talk)

Search Engine Safe/Friendly URLS

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
With a plus on the end
exH
03/28/08 06:22 A
> With a plus on the end
Tom Chiverton
03/28/08 06:36 A
Id just do it with 2
Bobby Hartsfield
03/28/08 03:05 P
I'm trying to use the following:
Nate Willard
03/28/08 03:10 P
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Nate Willard
03/28/2008 01:45 AM

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 handle punctuation? So Commas don't get a - and periods do? Can this be done in one like of Regex or does it need to be a series? Thanks

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Tom Chiverton
03/28/2008 05:34 AM

> <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 into dash. -- Tom Chiverton Helping to professionally e-enable collaborative materials on: http://thefalken.livejournal.com **************************************************** This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged.  If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents.   If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
exH
03/28/2008 06:22 AM

With a plus on the end [^a-zA-Z0-9]+ so that     this is some (, .]]text => this-is-some-text other wise you'll get    this-is-some-------text ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Tom Chiverton
03/28/2008 06:36 AM

> 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 **************************************************** This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged.  If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents.   If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Nate Willard
03/28/2008 12:46 PM

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 <tom.chiverton@halliwells.com> 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 **************************************************** This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged.  If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents.   If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Tom Chiverton
03/28/2008 12:54 PM

> 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. exp. to handle everything else. Maybe you want <cfset newUrl = reReplaceNoCase(arguments.theString, "[! \/\!""'£$%^&\*\(\)_+-=/-+]", "", "ALL")> <cfset newUrl = reReplaceNoCase(newurl, "[^a-zA-Z0-9]+", "-", "ALL")> or similar (i.e. first one strips anything funny, 2nd one makes anything left that isn't alphanumeric a dash). Watch the escaping on the first expression :-) -- Tom Chiverton Helping to competently visualize one-to-one meta-services on: http://thefalken.livejournal.com **************************************************** This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged.  If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents.   If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Bobby Hartsfield
03/28/2008 03:05 PM

Id just do it with 2 [^a-z0-9] with nothing Then spaces with _ > 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. exp. to handle everything else. Maybe you want <cfset newUrl = reReplaceNoCase(arguments.theString, "[! \/\!""'£$%^&\*\(\)_+-=/-+]", "", "ALL")> <cfset newUrl = reReplaceNoCase(newurl, "[^a-zA-Z0-9]+", "-", "ALL")> or similar (i.e. first one strips anything funny, 2nd one makes anything left that isn't alphanumeric a dash). Watch the escaping on the first expression :-) -- Tom Chiverton Helping to competently visualize one-to-one meta-services on: http://thefalken.livejournal.com **************************************************** This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged.  If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents.  If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Nate Willard
03/28/2008 03:10 PM

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 redashed? Thanks! Tom Chiverton <tom.chiverton@halliwells.com> 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. exp. to handle everything else. Maybe you want reReplaceNoCase(arguments.theString, "[! \/\!""'£$%^&\*\(\)_+-=/-+]", "", "ALL")> reReplaceNoCase(newurl, "[^a-zA-Z0-9]+", "-", "ALL")> or similar (i.e. first one strips anything funny, 2nd one makes anything left that isn't alphanumeric a dash). Watch the escaping on the first expression :-) -- Tom Chiverton Helping to competently visualize one-to-one meta-services on: http://thefalken.livejournal.com **************************************************** This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged.  If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents.   If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.


<< Previous Thread Today's Threads Next Thread >>

Mailing Lists
Subscribe Now
Fusion Authority Quarterly Update - ColdFusion 8 Special Edition