Loading ...
Sorry, an error occurred while loading the content.

17784Re: Dollars and cents

Expand Messages
  • ehofferino
    Apr 24, 2008
    • 0 Attachment
      Thanks Keith!

      I would love an explanation. Teach a man to fish...

      --- In ntb-clips@yahoogroups.com, "dracorat" <dracorat@...> wrote:
      >
      > In a new clip, use:
      >
      > ^!REPLACE "\b(\d)c\b" >> "\$0.0$1" AWRS
      > ^!REPLACE "\b(\d\d)c\b" >> "\$0.$1" AWRS
      > ^!REPLACE "\b(\d+)(\d\d)c\b" >> "\$$1.$2" AWRS
      >
      > If you want me to explain the regular expressions, just say the word.
      > --Keith
      >
      > --- In ntb-clips@yahoogroups.com, "ehofferino" <eyhoffmann@> wrote:
      > >
      > > Hi guys,
      > >
      > > I'm looking to write a simple clip that searches through a block of
      > > text and replaces all instances of monetary notation that look like
      > this:
      > >
      > > 44c
      > >
      > > with this
      > >
      > > $0.44.
      > >
      > > Here's what the block might look like before changes:
      > >
      > > ================
      > >
      > > KLA-Tencor-KLAC reports Q3 EPS 67c vs. consensus of 63c
      > > KLAC reports Q3 revenue of $602M vs. consensus of $586M.
      > >
      > > Cheesecake Factory-CAKE reports Q1 EPS of 21c vs. consensus of 21c
      > > Repots Q1 revenue of $393.8M vs. consensus of $396.3M.
      > >
      > > American Express-AXP reports Q1 EPS 84c vs. consensus of 81c
      > > Reports Q1 revenue $7.19B vs. consensus of $7.2B.
      > >
      > > Rambus-RMBS reports Q1 EPS (12c) vs. consensus of (6c)
      > > Reports Q1 revenue $39.7M vs. consensus of $40.23M.
      > >
      > > ================
      > >
      > > Here's what it should look like after changes:
      > >
      > > KLA-Tencor-KLAC reports Q3 EPS $0.67 vs. consensus of $0.63
      > > KLAC reports Q3 revenue of $602M vs. consensus of $586M.
      > >
      > > Cheesecake Factory-CAKE reports Q1 EPS of $0.21 vs. consensus of $0.21
      > > Repots Q1 revenue of $393.8M vs. consensus of $396.3M.
      > >
      > > American Express-AXP reports Q1 EPS $0.84 vs. consensus of $0.81
      > > Reports Q1 revenue $7.19B vs. consensus of $7.2B.
      > >
      > > Rambus-RMBS reports Q1 EPS ($0.12) vs. consensus of ($0.06)
      > > Reports Q1 revenue $39.7M vs. consensus of $40.23M.
      > >
      > > ===============
      > >
      > > Thanks
      > >
      >
    • Show all 7 messages in this topic