> LSParseCurrency would be used if you want to convert a number to a currency
no, it will try to parse anything - string, number, whatever - to a the currency subtype of a float. the official docs says it will take a string, and in CF speak, that means anything you throw at it. whether it errors is another issue. if Scott is looking for a quick fix, then, yes, Steve has the answer with his RegEx because of that typo. But I gotta ask, how could that typo get there in the first place? (since it's the only thing stopping LSParseCurrency from being used) and what would happen with $21o.08? on a keyboard "o" is right next to the zero. is that twenty-one dollars or two hundred and ten after conversion? > > Did I read the original question right? If so then why not just use > NumberFormat(string, mask)... But if you can't guarantee a validated number > string, dollar format then Steve's regex will work. > > > -- > Senior Coldfusion Developer > Aegeon Pty. Ltd. > www.aegeon.com.au > Phone: +613 8676 4223 > Mobile: 0404 998 273 > > > -----Original Message----- > From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf > Of Zac Spitzer > Sent: Wednesday, 9 July 2008 2:22 PM > To: [email protected] > Subject: [cfaussie] Re: ReReplaceNoCase - return only a decimal number > > > did you try using LSParseCurrency ? > > On Wed, Jul 9, 2008 at 2:16 PM, Scott Thornton > <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >> I would like to create an expression to remove all text and special > characters from a string, returning only a decimal-like looking number.. >> >> eg >> >> $12,345.00 -> 12345.00 >> $+10.65 -> 10.65 >> $-5.65 = -5.65 >> >> etc >> >> I suck at regular expressions.... >> >> Cheers, >> >> >> >> Scott Thornton, Programmer >> Billing Unit >> Hunter-New England Area Health Service >> ext: 51762 p: +61 02 491 51762 m: 0413 800 242 >> >> >> >> > >> > > > > -- > Zac Spitzer - > http://zacster.blogspot.com (My Blog) > +61 405 847 168 > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~----------~----~----~----~------~----~------~--~---
