RE: RegEx question: Multiple replaces in one statement

2005-07-29 Thread Ian Skinner
Replace just does a straight string literal matching, REReplace dose regex, 
which requires a little more processing to go with the increased power of 
matching patterns not just string literals..


--
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
 
"C code. C code run. Run code run. Please!"
- Cynthia Dunning

-Original Message-
From: B G [mailto:[EMAIL PROTECTED]
Sent: Friday, July 29, 2005 11:35 AM
To: CF-Talk
....Subject: RE: RegEx question: Multiple replaces in one statement

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: cf-talk@houseoffusion.com
>To: CF-Talk 
>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:
>
>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:
> >
> > "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.
>
>
>
>



~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:213295
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: RegEx question: Multiple replaces in one statement

2005-07-29 Thread B G
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: cf-talk@houseoffusion.com
>To: CF-Talk 
>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:
>
>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:
> >
> > "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


RE: RegEx question: Multiple replaces in one statement

2005-07-29 Thread Dave.Phillips
Here's how I would do it:



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:
> 
> 
> 
> 
> 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:213280
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


Re: RegEx question: Multiple replaces in one statement

2005-07-29 Thread Barney Boisvert
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:
> 
> 
> 
> 
> 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:213278
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