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

Re: [Clip] Delete Line Numbers

Expand Messages
  • Alec Burgess
    You don t really need a clip though 3 simple clips might help (one to put in the start-marker, one to put in the end-marker, and a one liner to do the regex
    Message 1 of 1 , Oct 31, 2001
    View Source
    • 0 Attachment
      You don't really need a clip though 3 simple clips might help (one to put in
      the start-marker, one to put in the end-marker, and a one liner to do the
      regex replace)

      If you put at start of range say: "xxx-start" and at the end of range
      "xxx-end", then
      REPLACE "xxx-start\a*xxx-end" >> "" R

      or using the "?" mark (which might have to be "escaped" to prevent it being
      recognized as a special character) and assuming its on a line of its own as
      you've shown:
      REPLACE "\?\*\?\n" >> "" R

      Note: this will fail miserably if there is more than one "xxx-end" in the
      document at a time - regex is greedy, it would go right from the first to
      the last and kill everything in-between!

      Hugo - thanks for pointing out the "\a" - match anything including
      new-lines.


      Regards ... Alec
      ----- Original Message -----
      From: <webmasterjmc@...>
      To: <ntb-clips@yahoogroups.com>
      Sent: 31 October, 2001 20:11
      Subject: [Clip] Delete Line Numbers


      > Hi All:
      >
      > I'm back after and extended illness so please forgive me if this
      > issue has been addressed here in the last few months. I have got
      > very rusty with clip programming lately.
      >
      > I need a clip that will delete line numbers without highlighting
      > them. I would like to put a flag where I would like to start the
      > line deletion, and one at the end of the line deletion. I work with
      > text consisting of thousands of lines. I need to omit or delete
      > hundreds of these lines at a time. For example:
      >
      > X10.5Y21.375
      > X3.963Y10.889
      > X-4.798Y23.67
      > X-3.996Y10.5
      > X21.5
      > Y10.5
      > X5.36
      > Y4.55
      > X10.889
      > Y4.3
      >
      > Say I need to delete lines 5-8. I would like to mark them with a
      > symbol, say a question mark and delete everything in between
      > including the symbol. Example below:
      >
      > X10.5Y21.375
      > X3.963Y10.889
      > X-4.798Y23.67
      > X-3.996Y10.5
      > ?
      > X21.5
      > Y10.5
      > X5.36
      > ?
      > Y4.55
      > X10.889
      > Y4.3
      >
      > The new text would look like this:
      >
      > X10.5Y21.375
      > X3.963Y10.889
      > X-4.798Y23.67
      > X-3.996Y10.5
      > Y4.55
      > X10.889
      > Y4.3
      >
      > If I need to delete hundreds of lines, highlighting them is not a
      > choice as is can be very time consuming (Try holding the mouse button
      > for 5-10 minutes ;)).
      >
      > Thank You in advance for suggestions and Ideas.
      >
      > John
      > webmasterjmc@...
      >
      >
      >
      >
      >
      >
      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.