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

22455Re: Remove a line

Expand Messages
  • flo.gehrke
    Jan 19, 2012
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, "John Shotsky" <jshotsky@...> wrote:
      > This should do what you want.
      > ^!Replace "(?s)^(\w{7}).+?\R.*\K\1.+?\R" >> "" AIRSW
      > ^!IfError Next Else Skip_-1
      > Sorting is not mandatory, but could be added.


      In my understanding, all three clips which you and humble me have posted so far have the specific advantage that duplicates are removed without changing the order of the lines, that is: they are designed NOT to sort the whole list.

      If we were allowed to SORT the list -- which, unfortunately, bozlawless didn't make clear -- we could have spared ourselves all those "skips, loops & jumps" by writing...

      ^!Toolbar Sort Ascending
      ^!Replace "(^.{7})\X+?\K(\1\X+?(\R|\Z))+" >> "" WARS

      (providing that 'Options|Tools|Sort Removes Duplicates' is checked).

    • Show all 17 messages in this topic