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

regex to take out lines ending in series of = signs plus a quote

Expand Messages
  • dpasseng
    I need to run a file removing all lines that end in ========== This includes the quote.
    Message 1 of 3 , May 1, 2005
    • 0 Attachment
      I need to run a file removing all lines that end in =========="

      This includes the quote.
    • hsavage
      ... Don, This will do as comments suggest unless there are other characters in the line that need to be delimited. H= Testexp ; removes line, leaves blank
      Message 2 of 3 , May 1, 2005
      • 0 Attachment
        dpasseng wrote:

        > I need to run a file removing all lines that end in =========="
        >
        > This includes the quote.

        Don,

        This will do as comments suggest unless there are other characters in
        the line that need to be delimited.


        H="Testexp"
        ; removes line, leaves blank line
        ;^!Replace .+\=+"$\n >> "" RSA

        ; removes line and blank line
        ^!Replace .+\=+"$\n >> "" RSA


        ºvº
        05.05.01
        hrs > hsavage@...
      • Hugo Paulissen
        don, hrs, Some remarks about this... .+========= would work as well, it is simpler, and since Notetab s regex engine is greedy it picks up all lines ending
        Message 3 of 3 , May 2, 2005
        • 0 Attachment
          don, hrs,

          Some remarks about this...

          .+=========" would work as well, it is simpler, and since Notetab's
          regex engine is greedy it picks up all lines ending with ten dashes
          and a ".

          I do not think the $-sign is needed here, especially since you
          include \n in the search criteria...

          I think the first example should omit the \n.

          If you do search for a new line at the end of a line, it will not
          find the lasat occurence (if that happens to be on the last line
          itself).

          Hugo

          >
          >
          > H="Testexp"
          > ; removes line, leaves blank line
          > ;^!Replace .+\=+"$\n >> "" RSA
          >
          > ; removes line and blank line
          > ^!Replace .+\=+"$\n >> "" RSA
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.