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

How to use regex to delete all lines with the word "kkk"

Expand Messages
  • c.brito78
    Hi friends, How to use regex to delete all lines with the word kkk ? Thanks!
    Message 1 of 6 , Sep 4 8:49 AM
      Hi friends,

      How to use regex to delete all lines with the word "kkk"?

      Thanks!
    • 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 2 of 6 , Sep 4 8:52 AM
        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 3 of 6 , Sep 4 9:16 AM
          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 4 of 6 , Sep 4 9:29 AM
            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 5 of 6 , Sep 4 9:58 AM
              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 6 of 6 , Sep 4 10:39 AM
                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.