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

Re: [Clip] Re: clip for inserting dots into number string

Expand Messages
  • Mike Breiding - Morgantown WV
    ... Yes, in a column such as: 3042910020 3042910020 3042910020 Thanks, -Mike
    Message 1 of 11 , Aug 13, 2010
    • 0 Attachment
      diodeom wrote:

      > Are your phone numbers strings of continuous ten digits?

      Yes, in a column such as:
      3042910020
      3042910020
      3042910020


      Thanks,
      -Mike
    • John Shotsky
      Not sure why. It works for me: ^!Replace b( d d d) K( d d d)( d d d d) b .$2 .$3 ARSTW 304.291.0020 304.291.0020 304.291.0020 304.291.0020
      Message 2 of 11 , Aug 13, 2010
      • 0 Attachment
        Not sure why. It works for me:
        ^!Replace "\b(\d\d\d)\K(\d\d\d)(\d\d\d\d)\b" >> "\.$2\.$3" ARSTW
        304.291.0020
        304.291.0020
        304.291.0020
        304.291.0020
        304.291.0020
        304.291.0020
        304.291.0020
        304.291.0020
        304.291.0020
        304.291.0020

        Regards,
        John


        -----Original Message-----
        From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of Mike Breiding -
        Morgantown WV
        Sent: Friday, August 13, 2010 06:09
        To: ntb-clips@yahoogroups.com
        Subject: Re: [Clip] clip for inserting dots into number string

        John Shotsky wrote:
        > One simple way to do it is this:
        > ^!Replace "\b(\d\d\d)\K(\d\d\d)(\d\d\d\d)\b" >> "\.$2\.$3" ARSTW
        > I assume there is no prefix, such as '1' on any of these phone numbers.
        > If there are, you could
        > rewrite it as this:
        > ^!Replace "\b(\d)?(\d\d\d)\K(\d\d\d)(\d\d\d\d)\b" >> "\.$3\.$4" ARSTW
        > If you would need a period after that hypothetical '1' the clip would
        > have to be rewritten so the
        > period would only be there if the 1 was there.
        > Regards, John

        Greetings,
        They are all in this format 3042910020 (hoped for
        result:304.291.0020)and in a column.
        When I open the file which contains the column of numbers and I launch
        the clip and nothing happens.


        >
        > From: ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.com>
        > [mailto:ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.com>]
        > On Behalf Of Mike Breiding -
        > Morgantown WV
        > Sent: Friday, August 13, 2010 03:19
        > To: ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.com>
        > Subject: [Clip] clip for inserting dots into number string
        >
        >
        >
        > Greetings,
        > I have about 300 phone numbers like this:
        > xxxxxxxxxx
        >
        > I want to change them to this:
        > xxx.xxx.xxxx
        >
        > Anyone have a ready made clip to do this?
        > Thanks.
        > -Mike
        >
        > --
        >
        > Morgantown WV
        >
        > www.EpicRoadTrips.us


        ------------------------------------

        Fookes Software: http://www.fookes.com/
        NoteTab website: http://www.notetab.com/
        NoteTab Discussion Lists: http://www.notetab.com/groups.php

        ***
        Yahoo! Groups Links
      • Mike Breiding - Morgantown WV
        ... I know why - I am a big dummy! I was running the clip in 4.95 Works fine in 5.7 Sorry about that... -Mike ... -- Morgantown WV www.EpicRoadTrips.us
        Message 3 of 11 , Aug 13, 2010
        • 0 Attachment
          John Shotsky wrote:
          >
          >
          > Not sure why. It works for me:

          I know why - I am a big dummy!
          I was running the clip in 4.95
          Works fine in 5.7

          Sorry about that...
          -Mike

          > ^!Replace "\b(\d\d\d)\K(\d\d\d)(\d\d\d\d)\b" >> "\.$2\.$3" ARSTW
          > 304.291.0020
          > 304.291.0020
          > 304.291.0020
          > 304.291.0020
          > 304.291.0020
          > 304.291.0020
          > 304.291.0020
          > 304.291.0020
          > 304.291.0020
          > 304.291.0020
          >
          > Regards,
          > John
          >
          > -----Original Message-----
          > From: ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.com>
          > [mailto:ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.com>]
          > On Behalf Of Mike Breiding -
          > Morgantown WV
          > Sent: Friday, August 13, 2010 06:09
          > To: ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.com>
          > Subject: Re: [Clip] clip for inserting dots into number string
          >
          > John Shotsky wrote:
          > > One simple way to do it is this:
          > > ^!Replace "\b(\d\d\d)\K(\d\d\d)(\d\d\d\d)\b" >> "\.$2\.$3" ARSTW
          > > I assume there is no prefix, such as '1' on any of these phone numbers.
          > > If there are, you could
          > > rewrite it as this:
          > > ^!Replace "\b(\d)?(\d\d\d)\K(\d\d\d)(\d\d\d\d)\b" >> "\.$3\.$4" ARSTW
          > > If you would need a period after that hypothetical '1' the clip would
          > > have to be rewritten so the
          > > period would only be there if the 1 was there.
          > > Regards, John
          >
          > Greetings,
          > They are all in this format 3042910020 (hoped for
          > result:304.291.0020)and in a column.
          > When I open the file which contains the column of numbers and I launch
          > the clip and nothing happens.
          >
          > >
          > > From: ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.com>
          > <mailto:ntb-clips%40yahoogroups.com>
          > > [mailto:ntb-clips@yahoogroups.com
          > <mailto:ntb-clips%40yahoogroups.com> <mailto:ntb-clips%40yahoogroups.com>]
          > > On Behalf Of Mike Breiding -
          > > Morgantown WV
          > > Sent: Friday, August 13, 2010 03:19
          > > To: ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.com>
          > <mailto:ntb-clips%40yahoogroups.com>
          > > Subject: [Clip] clip for inserting dots into number string
          > >
          > >
          > >
          > > Greetings,
          > > I have about 300 phone numbers like this:
          > > xxxxxxxxxx
          > >
          > > I want to change them to this:
          > > xxx.xxx.xxxx
          > >
          > > Anyone have a ready made clip to do this?
          > > Thanks.
          > > -Mike
          > >
          > > --
          > >
          > > Morgantown WV
          > >
          > > www.EpicRoadTrips.us
          >
          > ------------------------------------
          >
          > Fookes Software: http://www.fookes.com/
          > NoteTab website: http://www.notetab.com/
          > NoteTab Discussion Lists: http://www.notetab.com/groups.php
          >
          > ***
          > Yahoo! Groups Links
          >
          >

          --


          Morgantown WV

          www.EpicRoadTrips.us
        • diodeom
          ... In this case the notation could be even further stripped of redundancy: ^!Replace ^ d{3} K d{3} .$0 . WARS Perhaps test first how it works via the
          Message 4 of 11 , Aug 13, 2010
          • 0 Attachment
            Mike Breiding - Morgantown WV <mike@...> wrote:
            >
            > diodeom wrote:
            >
            > > Are your phone numbers strings of continuous ten digits?
            >
            > Yes, in a column such as:
            > 3042910020
            > 3042910020
            > 3042910020
            >
            >
            > Thanks,
            > -Mike
            >

            In this case the notation could be even further stripped of redundancy:

            ^!Replace "^\d{3}\K\d{3}" >> "\.$0\." WARS

            Perhaps test first how it works via the "manual" replace dialog (Ctrl+R) with Regular Exp. checked. The search pattern ^\d{3}\K\d{3} should highlight fourth, fifth and sixth digits. The replacement \.$0\. should place dots around that selection.
          • flo.gehrke
            ... Hi Dio, I love those RegEx which do not capture anything. So if we ve got a pure one-column list like that we could also write just... ^!Replace
            Message 5 of 11 , Aug 14, 2010
            • 0 Attachment
              --- In ntb-clips@yahoogroups.com, "diodeom" <diomir@...> wrote:
              >
              > > 3042910020
              > > 3042910020
              > > 3042910020
              >
              > In this case the notation could be even further stripped of
              > redundancy:
              >
              > ^!Replace "^\d{3}\K\d{3}" >> "\.$0\." WARS

              Hi Dio,

              I love those RegEx which do not capture anything. So if we've got a pure one-column list like that we could also write just...

              ^!Replace "\d{3}\K(?=\d{3})" >> "." AWRS

              BTW, you could strip even more: There's no need to escape the dot in the replacement string here ;-)

              Regards,
              Flo
            Your message has been successfully submitted and would be delivered to recipients shortly.