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

Keep only text in round brackets

Expand Messages
  • Piotr
    Hi everybody I haven t written clips in quite a while, so please help oil my rusty clip gears. I want to iterate through a text file, and remove from it text
    Message 1 of 4 , Apr 15, 2013
    • 0 Attachment
      Hi everybody

      I haven't written clips in quite a while, so please help oil my rusty clip
      gears.

      I want to iterate through a text file, and remove from it text outside
      round brackets.

      Eg.

      Ground (GC401)

      I want to delete Ground and keep what's in brackets.

      Sometimes the lines are longer but the bracketed expression is always at
      the end of the line.

      Will appreciate,

      Piotr


      [Non-text portions of this message have been removed]
    • John Shotsky
      If there are no other paren phrases present, this will do it. If there are, we can exclude them too. ^!Replace ^.*(?= (.+ )$) ARSW Regards, John
      Message 2 of 4 , Apr 15, 2013
      • 0 Attachment
        If there are no other paren phrases present, this will do it. If there are, we can exclude them too.
        ^!Replace "^.*(?=\(.+\)$)" >> "" ARSW

        Regards,
        John
        RecipeTools Web Site: <http://recipetools.gotdns.com/> http://recipetools.gotdns.com/
        John's Mags Yahoo Group: <http://groups.yahoo.com/group/johnsmags/> http://groups.yahoo.com/group/johnsmags/

        From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of Piotr
        Sent: Monday, April 15, 2013 12:16
        To: ntb-clips
        Subject: [Clip] Keep only text in round brackets


        Hi everybody

        I haven't written clips in quite a while, so please help oil my rusty clip
        gears.

        I want to iterate through a text file, and remove from it text outside
        round brackets.

        Eg.

        Ground (GC401)

        I want to delete Ground and keep what's in brackets.

        Sometimes the lines are longer but the bracketed expression is always at
        the end of the line.

        Will appreciate,

        Piotr

        [Non-text portions of this message have been removed]



        [Non-text portions of this message have been removed]
      • Piotr
        Thanks John, I figured that a regex could do it as well. Regards, Piotr ... [Non-text portions of this message have been removed]
        Message 3 of 4 , Apr 15, 2013
        • 0 Attachment
          Thanks John, I figured that a regex could do it as well.

          Regards,

          Piotr


          On Mon, Apr 15, 2013 at 9:25 PM, John Shotsky <jshotsky@...> wrote:

          > If there are no other paren phrases present, this will do it. If there
          > are, we can exclude them too.
          > ^!Replace "^.*(?=\(.+\)$)" >> "" ARSW
          >
          > Regards,
          > John
          > RecipeTools Web Site: <http://recipetools.gotdns.com/>
          > http://recipetools.gotdns.com/
          > John's Mags Yahoo Group: <http://groups.yahoo.com/group/johnsmags/>
          > http://groups.yahoo.com/group/johnsmags/
          >
          > From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On
          > Behalf Of Piotr
          > Sent: Monday, April 15, 2013 12:16
          > To: ntb-clips
          > Subject: [Clip] Keep only text in round brackets
          >
          >
          > Hi everybody
          >
          > I haven't written clips in quite a while, so please help oil my rusty clip
          > gears.
          >
          > I want to iterate through a text file, and remove from it text outside
          > round brackets.
          >
          > Eg.
          >
          > Ground (GC401)
          >
          > I want to delete Ground and keep what's in brackets.
          >
          > Sometimes the lines are longer but the bracketed expression is always at
          > the end of the line.
          >
          > Will appreciate,
          >
          > Piotr
          >
          > [Non-text portions of this message have been removed]
          >
          >
          >
          > [Non-text portions of this message have been removed]
          >
          >
          >
          > ------------------------------------
          >
          > Fookes Software: http://www.fookes.com/
          > NoteTab website: http://www.notetab.com/
          > NoteTab Discussion Lists: http://www.notetab.com/groups.php
          >
          > ***
          > Yahoo! Groups Links
          >
          >
          >
          >


          [Non-text portions of this message have been removed]
        • Axel Berger
          ... In this case Eric s new poor man s wildcards should suffice. ^!Replace )**( W*S Axel
          Message 4 of 4 , Apr 15, 2013
          • 0 Attachment
            Piotr wrote:
            > Thanks John, I figured that a regex could do it as well.

            In this case Eric's new poor man's wildcards should suffice.

            ^!Replace ")**(" >> "" W*S

            Axel
          Your message has been successfully submitted and would be delivered to recipients shortly.