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

Re: [Clip] How to remove lines with the word "xxx"

Expand Messages
  • Axel Berger
    ... Sorry, have to disagree. Mine just worked fine on your list: ^!Replace R.*(yahoo).* R n WRASTI As Don s is nearly exactly the same I ve no doubt
    Message 1 of 9 , Nov 3, 2011
    • 0 Attachment
      C wrote:
      > Both suggestions do not worked.

      Sorry, have to disagree. Mine just worked fine on your list:

      ^!Replace "\R.*(yahoo).*\R" >> "\n" WRASTI

      As Don's is nearly exactly the same I've no doubt his will too.

      Axel
    • C
      Hi, Perhaps is because I used: ^!Set rdSDyahoo ^!Replace R.*(^rdŽ* R n WRASTI I need to use a variable, because will be a lot of different words.
      Message 2 of 9 , Nov 3, 2011
      • 0 Attachment
        Hi,

        Perhaps is because I used:

        ^!Set rdSDyahoo
        ^!Replace "\R.*(^rdŽ*\R" >> "\n" WRASTI

        I need to use a variable, because will be a lot of different words.

        Thsnks. I know that Axel is a guru.


        --- In ntb-clips@yahoogroups.com, "C" <backup2abet@...> wrote:
        >
        > Hi friends Axel and Don, thanks.
        >
        > Both suggestions do not worked.
        >
        > Let say that I have this list:
        >
        > a-gamal@...
        > a-jhemi@...
        > a.aanha@...
        > a.abdullayev@...
        > a.abouzeid@...
        > example@...
        >
        > Let say that I want to remove all lines that have the "yahoo" word.
        >
        > Thanks.
        >
      • C
        In other words, I need to use a variable in place of the (....), because will be a lot of different words.
        Message 3 of 9 , Nov 3, 2011
        • 0 Attachment
          In other words, I need to use a variable in place of the (....), because will be a lot of different words.

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


          --- In ntb-clips@yahoogroups.com, "C" <backup2abet@...> wrote:
          >
          > Hi,
          >
          > Perhaps is because I used:
          >
          > ^!Set rdSDyahoo
          > ^!Replace "\R.*(^rdŽ*\R" >> "\n" WRASTI
          >
          > I need to use a variable, because will be a lot of different words.
          >
          > Thsnks. I know that Axel is a guru.
          >
          >
          > --- In ntb-clips@yahoogroups.com, "C" <backup2abet@> wrote:
          > >
          > > Hi friends Axel and Don, thanks.
          > >
          > > Both suggestions do not worked.
          > >
          > > Let say that I have this list:
          > >
          > > a-gamal@
          > > a-jhemi@
          > > a.aanha@
          > > a.abdullayev@
          > > a.abouzeid@
          > > example@
          > >
          > > Let say that I want to remove all lines that have the "yahoo" word.
          > >
          > > Thanks.
          > >
          >
        • John Shotsky
          You can separate all the words with pipes, and still run just one clip. (word1|word2|word3|wordn) Regards, John RecipeTools Web Site:
          Message 4 of 9 , Nov 3, 2011
          • 0 Attachment
            You can separate all the words with pipes, and still run just one clip.
            (word1|word2|word3|wordn)

            Regards,
            John
            RecipeTools Web Site: <http://recipetools.gotdns.com/> http://recipetools.gotdns.com/

            From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of C
            Sent: Thursday, November 03, 2011 12:47
            To: ntb-clips@yahoogroups.com
            Subject: [Clip] Re: How to remove lines with the word ^rd



            In other words, I need to use a variable in place of the (....), because will be a lot of different words.

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

            --- In ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.com> , "C" <backup2abet@...> wrote:
            >
            > Hi,
            >
            > Perhaps is because I used:
            >
            > ^!Set rdSDyahoo
            > ^!Replace "\R.*(^rd��*\R" >> "\n" WRASTI
            >
            > I need to use a variable, because will be a lot of different words.
            >
            > Thsnks. I know that Axel is a guru.
            >
            >
            > --- In ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.com> , "C" <backup2abet@> wrote:
            > >
            > > Hi friends Axel and Don, thanks.
            > >
            > > Both suggestions do not worked.
            > >
            > > Let say that I have this list:
            > >
            > > a-gamal@
            > > a-jhemi@
            > > a.aanha@
            > > a.abdullayev@
            > > a.abouzeid@
            > > example@
            > >
            > > Let say that I want to remove all lines that have the "yahoo" word.
            > >
            > > Thanks.
            > >
            >



            [Non-text portions of this message have been removed]
          • diodeom
            ... Either: ^!Set %word%=yahoo ^!Replace ^.*? Q^%word% E.*( R| Z) WARS or: ^!Set %word%=yahoo ^!Find ^%word% WITS ^!IfError End ^!DeleteLine ^!Goto
            Message 5 of 9 , Nov 3, 2011
            • 0 Attachment
              "C" <backup2abet@...> wrote:
              >
              >
              > In other words, I need to use a variable in place of the (....), because will be a lot of different words.
              >

              Either:

              ^!Set %word%=yahoo
              ^!Replace "^.*?\Q^%word%\E.*(\R|\Z)" >> "" WARS

              or:

              ^!Set %word%=yahoo
              ^!Find ^%word% WITS
              ^!IfError End
              ^!DeleteLine
              ^!Goto Skip_-3
            • Don
              right, set the variable thus word1|word2|word3 Your text for the word is funky so I m guessing maybe you have special characters in there that need to be
              Message 6 of 9 , Nov 3, 2011
              • 0 Attachment
                right, set the variable thus word1|word2|word3

                Your text for the word is funky so I'm guessing maybe you have special
                characters in there that need to be pre-pended with and escape? \" or \)

                And then:
                ^!Replace "^.*(^%variable%).*\R" >> "" RAWS

                As usual I have no idea what dio is talking about -- but I'm sure it
                totally works.

                On 11/3/2011 3:46 PM, C wrote:
                >
                > In other words, I need to use a variable in place of the (....), because will be a lot of different words.
                >
                > ------------------------------------
                >
                >
                > --- In ntb-clips@yahoogroups.com, "C" <backup2abet@...> wrote:
                >>
                >> Hi,
                >>
                >> Perhaps is because I used:
                >>
                >> ^!Set rdSDyahoo
                >> ^!Replace "\R.*(^rdŽ*\R" >> "\n" WRASTI
                >>
              • Axel Berger
                ... I can t read that. Going to the source I find ^!Set =18rdSDyahoo ^!Replace R.*(^=18rd=8E* R n WRASTI What are the characters $18 and $8E? You ll
                Message 7 of 9 , Nov 3, 2011
                • 0 Attachment
                  C wrote:
                  > ^!Set rdSDyahoo
                  > ^!Replace "\R.*(^rdŽ*\R" >> "\n" WRASTI

                  I can't read that. Going to the source I find

                  ^!Set =18rdSDyahoo
                  ^!Replace "\R.*(^=18rd=8E*\R" >> "\n" WRASTI

                  What are the characters $18 and $8E? You'll probably nned to write them
                  as \x18 and \x8E whatever they are for. I have just tried using
                  variables inside a Regex Replace myself and to my surprise it worked
                  fine.

                  Axel
                • Don
                  I use variables in regex s all the time myself. I think using ^ (means beginning of the line) instead of R is better at the front because it could be the
                  Message 8 of 9 , Nov 3, 2011
                  • 0 Attachment
                    I use variables in regex's all the time myself.

                    I think using ^ (means beginning of the line) instead of \R is better at
                    the front because it could be the first line.

                    Dio used (\R|\Z) at the back end which is better than either of us as it
                    will include the last line. I am trying to remember that one more myself.

                    I don't get his \Q and \whatever it was in the middle so I need to go
                    look those up ... maybe word boundary or something?

                    On 11/3/2011 6:38 PM, Axel Berger wrote:
                    > C wrote:
                    >> ^!Set rdSDyahoo
                    >> ^!Replace "\R.*(^rdŽ*\R" >> "\n" WRASTI
                    >
                    > I can't read that. Going to the source I find
                    >
                    > ^!Set =18rdSDyahoo
                    > ^!Replace "\R.*(^=18rd=8E*\R" >> "\n" WRASTI
                    >
                    > What are the characters $18 and $8E? You'll probably nned to write them
                    > as \x18 and \x8E whatever they are for. I have just tried using
                    > variables inside a Regex Replace myself and to my surprise it worked
                    > fine.
                    >
                    > Axel
                    >
                  Your message has been successfully submitted and would be delivered to recipients shortly.