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

22150RE: [Clip] A little help on look behinds

Expand Messages
  • John Shotsky
    Oct 15, 2011
    • 0 Attachment
      It turns out that this does not do as needed. For reference, there may be, at most, one instance where ]]] is not
      preceded anywhere in the file by a [[[. That is the only ]]] that should be removed. It is always the first one. So in
      essence it is
      ;Start at beginning of file \A
      ;no instances of ([[[) permitted in search
      ;one instance of (]]]) gets removed, if present. There may be lots of text and various [] preceding, but not multiples
      like [[[ ]]].

      Sample:
      This is the beginning of the file. There may be paragraphs here that include [ and or ] but not in multiples. This text
      is to remain. The next line is to disappear.
      ]]]
      [[[
      some text
      ]]]
      [[[
      some more text
      ]]]

      Only the first ]]] needs to be removed.
      Regards,
      John


      -----Original Message-----
      From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of John Shotsky
      Sent: Friday, October 07, 2011 04:00
      To: ntb-clips@yahoogroups.com
      Subject: RE: [Clip] A little help on look behinds

      As a matter of fact, both opening and closing may appear between \A and the wanted removal. Just not multiples. I think
      this does it, thank you! I have never used *COMMIT before, so I'll go see what that does.

      Regards,
      John


      -----Original Message-----
      From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of Sheri
      Sent: Thursday, October 06, 2011 23:01
      To: ntb-clips@yahoogroups.com
      Subject: Re: [Clip] A little help on look behinds

      In case there might be any valid opening brackets in the text prior to
      the ]]] line that needs deleting:

      ^!Replace "(?s)\A.+?\R\K(?=\]\]\]|\[\[\[)(*COMMIT)(?-s)\]\]\].*\R" >> ""
      WARS

      Regards,
      Sheri


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

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

      ***
      Yahoo! Groups Links





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

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

      ***
      Yahoo! Groups Links
    • Show all 21 messages in this topic