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

22573Re: [NTB] Remove x number of characters from a line of text

Expand Messages
  • flo.gehrke
    May 28, 2012
    • 0 Attachment
      --- In notetab@yahoogroups.com, "John Shotsky" <jshotsky@...> wrote:
      >
      > Sure. First, the answer about how to make it repeatable is to
      > create a clip library of your own, and add these functions
      > to it. (...)
      > So, for my clip example, assuming you want ONLY 2 or 3 digits
      > removed, it goes as follows:
      > \x20\d\d\d?$

      Bruce wrote...

      > the string of numerals at the end of each line is ALWAYS either
      > 2 or 3 characters in length. But that doesn't mean that at some
      > point down the track I won't need to strip out 4 or more, or
      > maybe only 1 character.

      So, obviously, neither '\x20\d\d\d?' (John) nor '\x20\d{2,3}$' (Alec) is an appropriate pattern here but you have to use '\x20\d{1,}$'.

      Bruce also mentioned...

      > I have a SERIES OF TEXT FILES where each line contains a set of data

      In this case, 'Search | Search Disk | Replace in Files' might be a better tool than a clip.

      If Bruce insists on a clip, he also has to consider how to edit that SERIES of files with a clip in case he doesn't want to open them manually one by one.

      Regards,
      Flo
    • Show all 22 messages in this topic