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

Re: How to remove lines with the word ^rd

Expand Messages
  • C
    In other words, I need to use a variable in place of the (....), because will be a lot of different words.
    Message 1 of 9 , Nov 3 12:46 PM
      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 2 of 9 , Nov 3 1:04 PM
        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 3 of 9 , Nov 3 1:06 PM
          "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 4 of 9 , Nov 3 1:35 PM
            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 5 of 9 , Nov 3 3:38 PM
              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 6 of 9 , Nov 3 6:04 PM
                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.