[Home] [By Thread] [By Date] [Recent Entries]
At 2010-01-16 21:26 -0700, Karl Stubsjoen wrote:
Besides a recursive template which strips obvious dollar syntax from a string, is there a better way to achieve a number from items like: $ 330.01 $ 1,100.32 - 234 1 $5 -16.23 Notice the negative, this should be preserved. I'm interested in a 1.0 solution. When you know the characters to remove, use this: translate(.,'$ ,','') When you don't know the characters to remove, use the double-translate idiom: translate(.,translate(.,'-0123456789.',''),'') I hope this helps. . . . . . . . . . . . . Ken
|

Cart



