Re: Replacing variable text in a string
RERepalce(yourString,"set primary_assign_id = [:digit:]{3}","","all") Should work, but has not been tested. On Tue, 1 Feb 2005 12:57:51 -0500, Mickael <[EMAIL PROTECTED]> wrote: > Hello, > > I would like replace a portion of a string that is a SQL statement generated > by my users via an interface that I have created. I have never used Regular > Expressions but from what I have heard about this task sounds like a > candidate. > > I would like to update a SQL statement that is generated by my users there is > a portion of the string that says "set primary_assign_id = 123" that I would > like to remove the problem is that I am not sure what the number is but I > know that it always three numbers. > > How can I do this? > > Regards, > > Mike > > ~| 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:192617 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: Replacing variable text in a string
Hey Scott, This is not working for me. I corrected the typo from Palace to place but it is not working. Any Ideas? Thanks Mike - Original Message - From: "Scott Stroz" <[EMAIL PROTECTED]> To: "CF-Talk" Sent: Tuesday, February 01, 2005 2:04 PM Subject: Re: Replacing variable text in a string > RERepalce(yourString,"set primary_assign_id = [:digit:]{3}","","all") > > Should work, but has not been tested. > > > On Tue, 1 Feb 2005 12:57:51 -0500, Mickael <[EMAIL PROTECTED]> wrote: > > Hello, > > > > I would like replace a portion of a string that is a SQL statement generated by my users via an interface that I have created. I have never used Regular Expressions but from what I have heard about this task sounds like a candidate. > > > > I would like to update a SQL statement that is generated by my users there is a portion of the string that says "set primary_assign_id = 123" that I would like to remove the problem is that I am not sure what the number is but I know that it always three numbers. > > > > How can I do this? > > > > Regards, > > > > Mike > > > > > > ~| 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:192645 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: Replacing variable text in a string
This works and is tested: yourString = "set primary_assign_id = 123"; #REReplaceNoCase(yourString,"set primary_assign_id = [[:digit:]]{3}","","ALL")# Good luck. Ryan Duckworth Macromedia ColdFusion Certified Professional Uhlig Communications 10983 Granada Lane Overland Park, KS 66211 (913) 754-4272 -Original Message- From: Mickael [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 01, 2005 2:43 PM To: CF-Talk Subject: Re: Replacing variable text in a string Hey Scott, This is not working for me. I corrected the typo from Palace to place but it is not working. Any Ideas? Thanks Mike - Original Message - From: "Scott Stroz" <[EMAIL PROTECTED]> To: "CF-Talk" Sent: Tuesday, February 01, 2005 2:04 PM Subject: Re: Replacing variable text in a string > RERepalce(yourString,"set primary_assign_id = [:digit:]{3}","","all") > > Should work, but has not been tested. > > > On Tue, 1 Feb 2005 12:57:51 -0500, Mickael <[EMAIL PROTECTED]> wrote: > > Hello, > > > > I would like replace a portion of a string that is a SQL statement generated by my users via an interface that I have created. I have never used Regular Expressions but from what I have heard about this task sounds like a candidate. > > > > I would like to update a SQL statement that is generated by my users there is a portion of the string that says "set primary_assign_id = 123" that I would like to remove the problem is that I am not sure what the number is but I know that it always three numbers. > > > > How can I do this? > > > > Regards, > > > > Mike > > > > > > ~| 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:192655 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: Replacing variable text in a string
Hi Ryan, This is not working for me either. Here is what I have #DisplaySql# #REReplaceNoCase(DisplaySql,"set primary_assign_id =[[:digit:]]{3}","","ALL")# When I out put the DisplaySQL variable each instance looks the same. I am wonder if the digit part is an issue? Could it be that the numbers are coming across as text and not being recognized? Just seems so simple that it should work. One thing about my variable is that I am using PreservesingleQuotes() to create it. Could that have anything to do with it? Mike - Original Message - From: "Ryan Duckworth" <[EMAIL PROTECTED]> To: "CF-Talk" Sent: Tuesday, February 01, 2005 4:25 PM Subject: RE: Replacing variable text in a string > This works and is tested: > > > yourString = "set primary_assign_id = 123"; > > > > #REReplaceNoCase(yourString,"set primary_assign_id = > [[:digit:]]{3}","","ALL")# > > > Good luck. > > Ryan Duckworth > Macromedia ColdFusion Certified Professional > Uhlig Communications > 10983 Granada Lane > Overland Park, KS 66211 > (913) 754-4272 > > -Original Message- > From: Mickael [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 01, 2005 2:43 PM > To: CF-Talk > Subject: Re: Replacing variable text in a string > > Hey Scott, > > This is not working for me. I corrected the typo from Palace to place > but > it is not working. Any Ideas? > > Thanks > > Mike > - Original Message - > From: "Scott Stroz" <[EMAIL PROTECTED]> > To: "CF-Talk" > Sent: Tuesday, February 01, 2005 2:04 PM > Subject: Re: Replacing variable text in a string > > > > RERepalce(yourString,"set primary_assign_id = [:digit:]{3}","","all") > > > > Should work, but has not been tested. > > > > > > On Tue, 1 Feb 2005 12:57:51 -0500, Mickael <[EMAIL PROTECTED]> wrote: > > > Hello, > > > > > > I would like replace a portion of a string that is a SQL statement > generated by my users via an interface that I have created. I have > never > used Regular Expressions but from what I have heard about this task > sounds > like a candidate. > > > > > > I would like to update a SQL statement that is generated by my users > there is a portion of the string that says "set primary_assign_id = 123" > that I would like to remove the problem is that I am not sure what the > number is but I know that it always three numbers. > > > > > > How can I do this? > > > > > > Regards, > > > > > > Mike > > > > > > > > > > > > > > ~| 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:192730 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: Replacing variable text in a string
Please disregard Ryan, This is working fine, it seems that I left out a space before the Digit statement. Thanks ~| 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:192736 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: Replacing variable text in a string
To avoid space issues (or numbers with more or less than 3 digits) #REReplaceNoCase(DisplaySql,"set\s+primary_assign_id\s*=\s*\d+","","ALL" )# Thera re no spaces att all in this regexp (in case the email text gets wrapped in the wrong place) Pascal > -Original Message- > From: Mickael [mailto:[EMAIL PROTECTED] > Sent: 02 February 2005 12:14 > To: CF-Talk > Subject: Re: Replacing variable text in a string > > Please disregard Ryan, > > This is working fine, it seems that I left out a space before the Digit > statement. > > Thanks > > > > > ~| 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:192747 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