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

Re: [Clip] How to use regex to delete all lines with the word "kkk"

Expand Messages
  • Don
    That would be my clip of yesterday. Or try this: ^!Replace .*?kkk.* r n RAWS However that would take kkk out of the middle of a word as well.
    Message 1 of 6 , Sep 4, 2011
    • 0 Attachment
      That would be my clip of yesterday.

      Or try this:
      ^!Replace ".*?kkk.*\r\n" >> "" RAWS

      However that would take kkk out of the middle of a word as well.



      On 9/4/2011 11:49 AM, c.brito78 wrote:
      > Hi friends,
      >
      > How to use regex to delete all lines with the word "kkk"?
      >
      > Thanks!
    • Axel Berger
      ... No. With that question mark, it will only delete zero characters in front of the kkk. Make it ^!Replace ^.*kkk.*$ RAWS Axel
      Message 2 of 6 , Sep 4, 2011
      • 0 Attachment
        Don wrote:
        > Or try this:
        > ^!Replace ".*?kkk.*\r\n" >> "" RAWS

        No. With that question mark, it will only delete zero characters in
        front of the kkk. Make it

        ^!Replace "^.*kkk.*$" >> "" RAWS

        Axel
      • C
        Hi, Thanks to all friends!
        Message 3 of 6 , Sep 4, 2011
        • 0 Attachment
          Hi,

          Thanks to all friends!

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

          --- In ntb-clips@yahoogroups.com, Axel Berger <Axel-Berger@...> wrote:
          >
          > Don wrote:
          > > Or try this:
          > > ^!Replace ".*?kkk.*\r\n" >> "" RAWS
          >
          > No. With that question mark, it will only delete zero characters in
          > front of the kkk. Make it
          >
          > ^!Replace "^.*kkk.*$" >> "" RAWS
          >
          > Axel
          >
        • Axel Berger
          ... Don t thank me too early. My suugestion would leave you with loads of empty lines. Don thought of getting rid of the carriage return and line feed too, I
          Message 4 of 6 , Sep 4, 2011
          • 0 Attachment
            C wrote:
            > Thanks to all friends!

            Don't thank me too early. My suugestion would leave you with loads of
            empty lines. Don thought of getting rid of the carriage return and line
            feed too, I forgot, so the correct solution is:

            ^!Replace "^.*kkk.*\R" >> "" RAWS

            Axel
          • Don
            correct ... what was I thinking :-)
            Message 5 of 6 , Sep 4, 2011
            • 0 Attachment
              correct ... what was I thinking :-)

              On 9/4/2011 12:16 PM, Axel Berger wrote:
              > Don wrote:
              >> Or try this:
              >> ^!Replace ".*?kkk.*\r\n" >> "" RAWS
              >
              > No. With that question mark, it will only delete zero characters in
              > front of the kkk. Make it
              >
              > ^!Replace "^.*kkk.*$" >> "" RAWS
              >
              > Axel
            Your message has been successfully submitted and would be delivered to recipients shortly.