Converting foreign numeric conventions to US

Discussion in 'Python' started by PoulsenL@capanalysis.com, Aug 14, 2003.

  1. Guest

    I have a number of text fields with different ways of exressing currency.
    Examples:

    1 512,3 M
    0.214,0 m
    1 123 k
    1,234,567
    1.235.458,90
    1,234,324 m (Where in this case m is to be conveyed as k. My only check is
    to look at the final number and adjust by /1000 if greater than say 1
    billion)
    12,456 M [Tab] 67,897 k (where these numbers represent two different
    scenarios)
    1) [Tab] 0.456,9 M [CR] 2) [Tab] 45.879,0 M (where these numbers represent
    two different scenarios)

    plus a few other creative ways to express currency. I have written a re
    that covers each case and, using matched groups, puts things back together
    using the US convention but I was hoping for a cleaner more pythonic (read:
    more readable) solution.

    Thanks in advance,

    Loren
    --------------------------------------------------------------------------------------------------------------------
    This email and any attachments contain information from CapAnalysis, LLC, which may be confidential and/or privileged. The information is intended to be for the use of the individual or entity named on this email. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this email is prohibited. If you receive this email in error, please notify us by reply email immediately so that we can arrange for the retrieval of the original documents at no cost to you.
     
    , Aug 14, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. luna
    Replies:
    1
    Views:
    13,882
    Kevin Spencer
    Feb 6, 2004
  2. H5N1
    Replies:
    0
    Views:
    466
  3. Replies:
    5
    Views:
    960
    X-Centric
    Jun 30, 2005
  4. darrel
    Replies:
    4
    Views:
    849
    darrel
    Jul 19, 2007
  5. jobs

    int to numeric numeric(18,2) ?

    jobs, Jul 21, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    1,002
    =?ISO-8859-1?Q?G=F6ran_Andersson?=
    Jul 22, 2007
Loading...

Share This Page