Re: List, Quotes, Commas UGH
Thank you folks, that worked great! Paul Giesnehagen QuillDesign The key here of course is the RE - (Aren't there laws concerning coding RE's this late at night? eh? hehe) cfscript myList = '22,33.44,21.93,1,090.33,2,999.00'; myList = REReplace(myList, '()([0-9_]*)([,]*)([0-9_.]*)()', '\2\4', 'ALL'); /cfscript This should get ya rollin =) Nate Nielsen FusionScript DevTeam [EMAIL PROTECTED] [EMAIL PROTECTED] Develop CF apps that talk to the server without page reloads ! Create client functionality with CF syntax ! www.FusionScript.com - Original Message - From: Paul Giesenhagen [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Thursday, May 16, 2002 12:21 AM Subject: List, Quotes, Commas UGH I have a list with comma's and quotes, here is a sample: 22,33.44,21.93,1,090.33,2,999.00 I need to strip out the as well as take the comma out of the thousand number so 1,999 would be 1999 but still keep my list in tact NOTE: ,1,090.33,2,999.00 Those values are seperated by a comma If I replace with nothing, then my list gets out of wack because of the 1,999 comma .. I am sure there is a simple method to roll through these, but I am sure someone has a quick answer... Thanks in advance! Paul Giesenhagen QuillDesign __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
List, Quotes, Commas UGH
I have a list with comma's and quotes, here is a sample: 22,33.44,21.93,1,090.33,2,999.00 I need to strip out the as well as take the comma out of the thousand number so 1,999 would be 1999 but still keep my list in tact NOTE: ,1,090.33,2,999.00 Those values are seperated by a comma If I replace with nothing, then my list gets out of wack because of the 1,999 comma .. I am sure there is a simple method to roll through these, but I am sure someone has a quick answer... Thanks in advance! Paul Giesenhagen QuillDesign __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: List, Quotes, Commas UGH
This seems to work on the data you supplied... #REReplace(MyList, (([[:digit:]]+),)?([[:digit:]]+)(.[[:digit:]]+)?, \2\3\4, All)# Regards, Matthew Walker /* Easier, smarter forms: http://www.matthewwalker.net.nz/inform2 */ -Original Message- From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]] Sent: Thursday, 16 May 2002 5:21 p.m. To: CF-Talk Subject: List, Quotes, Commas UGH I have a list with comma's and quotes, here is a sample: 22,33.44,21.93,1,090.33,2,999.00 I need to strip out the as well as take the comma out of the thousand number so 1,999 would be 1999 but still keep my list in tact NOTE: ,1,090.33,2,999.00 Those values are seperated by a comma If I replace with nothing, then my list gets out of wack because of the 1,999 comma .. I am sure there is a simple method to roll through these, but I am sure someone has a quick answer... Thanks in advance! Paul Giesenhagen QuillDesign __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: List, Quotes, Commas UGH
The key here of course is the RE - (Aren't there laws concerning coding RE's this late at night? eh? hehe) cfscript myList = '22,33.44,21.93,1,090.33,2,999.00'; myList = REReplace(myList, '()([0-9_]*)([,]*)([0-9_.]*)()', '\2\4', 'ALL'); /cfscript This should get ya rollin =) Nate Nielsen FusionScript DevTeam [EMAIL PROTECTED] [EMAIL PROTECTED] Develop CF apps that talk to the server without page reloads ! Create client functionality with CF syntax ! www.FusionScript.com - Original Message - From: Paul Giesenhagen [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Thursday, May 16, 2002 12:21 AM Subject: List, Quotes, Commas UGH I have a list with comma's and quotes, here is a sample: 22,33.44,21.93,1,090.33,2,999.00 I need to strip out the as well as take the comma out of the thousand number so 1,999 would be 1999 but still keep my list in tact NOTE: ,1,090.33,2,999.00 Those values are seperated by a comma If I replace with nothing, then my list gets out of wack because of the 1,999 comma .. I am sure there is a simple method to roll through these, but I am sure someone has a quick answer... Thanks in advance! Paul Giesenhagen QuillDesign __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists