Thanks!  I actually did have the one line with REReplace but a well hidden 
syntax error got me to separate the two.

For my own education, what is REReplace doing that Replace is not which adds 
the overhead?


>From: <[EMAIL PROTECTED]>
>Reply-To: [email protected]
>To: CF-Talk <[email protected]>
>Subject: RE: RegEx question: Multiple replaces in one statement
>Date: Fri, 29 Jul 2005 11:19:07 -0500
>
>Here's how I would do it:
>
><cfset nBrand = 
>Replace(Replace(qGetBrandNames.Brand_Names,"~","(r)","ALL"),"^","&##8482;","ALL")
> 
> >
>
>You're still calling replace twice, but it's only one line of code.  And 
>Barney's right...don't use REReplace if you don't need it, it's extra 
>overhead.
>
>Dave
>
>---Original Message-----
>From: Barney Boisvert [mailto:[EMAIL PROTECTED]
>Sent: Friday, July 29, 2005 12:05 PM
>To: CF-Talk
>Subject: Re: RegEx question: Multiple replaces in one statement
>
>
>Nope, but you don't REreplace at all, a simple replace will do the
>trick just as well, and with less overhead.  You could even use
>replaceList, but I'd not recommend that, as it has some weird quirks.
>
>cheers,
>barneyb
>
>On 7/29/05, B G <[EMAIL PROTECTED]> wrote:
> > Is it possible to replace two different items in a string?
> >
> > I have a table holding brand names.  All ~ should be (r) AND all ^ 
>should be
> > TM.  Currently I am doing the following:
> >
> > <cfset nBrand = "#REReplace(qGetBrandNames.Brand_Names, "~", "(r)", 
>"ALL")#">
> > <cfset nBrand = "#REReplace(nBrand, "\^", "&##8482;", "ALL")#">
> >
> > Is it possible to do this in one REReplace statement?
> >
> > Thanks.
> >
> >
>--
>Barney Boisvert
>[EMAIL PROTECTED]
>360.319.6145
>http://www.barneyb.com/
>
>Got Gmail? I have 50 invites.
>
>
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:213294
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to