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

Re: [NTS] Trying to perfect RegExp to match various numbers

Expand Messages
  • Alec Burgess
    ... It does allow the $2 to be substituted but ^%empty% does not appear to get translated. I get results like this: 45.6 == 0000045.6^%empty%0000 -- Regards
    Message 1 of 14 , Apr 1, 2011
    • 0 Attachment
      On 2011-04-01 16:08, Eb wrote:
      >
      >
      > I'm not sure this will work, but the variable ought to break up the
      > output pattern:
      >
      > ^!replace "\b(\d+)\.?(\d*)\b" >> "00000$1.$2^%empty%0000" rwais
      It does allow the $2 to be substituted but ^%empty% does not appear to
      get translated.
      I get results like this:
      45.6 ==> 0000045.6^%empty%0000
      --
      Regards ... Alec (buralex@gmail & WinLiveMess - alec.m.burgess@skype)
    • Eb
      Ok, try this (hex code x30 for the first zero): $2 x30000 Eb
      Message 2 of 14 , Apr 4, 2011
      • 0 Attachment
        Ok, try this (hex code '\x30' for the first zero):

        $2\x30000

        Eb


        --- In ntb-scripts@yahoogroups.com, Alec Burgess <buralex@...> wrote:
        >
        > > ^!replace "\b(\d+)\.?(\d*)\b" >> "00000$1.$2^%empty%0000" rwais
        > It does allow the $2 to be substituted but ^%empty% does not appear to
        > get translated.
        > I get results like this:
        > 45.6 ==> 0000045.6^%empty%0000
        > --
        > Regards ... Alec (buralex@gmail & WinLiveMess - alec.m.burgess@skype)
        >
      • Alec Burgess
        Thanks Eb - x30 works. when I was messing around with this I had tried the same thing but realize now that I was trying (the meaningless) uppercase X30
        Message 3 of 14 , Apr 4, 2011
        • 0 Attachment
          Thanks Eb - \x30 works.
          when I was messing around with this I had tried the same thing but
          realize now that I was trying (the meaningless) uppercase \X30 instead
          of the correct \x30. Ooops ! :-[

          On 2011-04-04 09:18, Eb wrote:
          > Ok, try this (hex code '\x30' for the first zero):
          >
          > $2\x30000
          >
          > Eb
          >
          > --- In ntb-scripts@yahoogroups.com
          > <mailto:ntb-scripts%40yahoogroups.com>, Alec Burgess <buralex@...> wrote:
          > >
          > > > ^!replace "\b(\d+)\.?(\d*)\b" >> "00000$1.$2^%empty%0000" rwais
          > > It does allow the $2 to be substituted but ^%empty% does not appear to
          > > get translated.
          > > I get results like this:
          > > 45.6 ==> 0000045.6^%empty%0000

          --
          Regards ... Alec (buralex@gmail & WinLiveMess - alec.m.burgess@skype)


          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.