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

Re: [Clip] Clip for getting lines containing

Expand Messages
  • Don Daugherty
    ... If I understand correctly, your (?) means any one of these: (A), (B), ...,(Z), (a), (b),..., (z), and it must occur at the line end. In that case, I would
    Message 1 of 10 , Sep 6, 2008
      gunnisonbirder wrote:
      > I am using following clip for getting lines containing "search string"
      >
      > ^!Set %Search%=^?{Enter search string:}
      > ^!SetListDelimiter ^P
      > ^!Set %Lines%=^$GetDocMatchAll(^.*^%Search%.*$)$
      > ^!Toolbar New Document
      > ^!InsertText ^%Lines%
      >
      > Is it possible and how can I adjust clip to get lines containing (?)
      > where there is one letter between parentheses? (?) always appears at
      > the end of the line of list of 500 names.
      >
      >
      If I understand correctly, your (?) means any one of these: (A), (B),
      ...,(Z), (a), (b),..., (z), and it must occur at the line end.
      In that case, I would use this for my search string: "^.?\([A-Za-z]\)\r\n"
    • gunnisonbirder
      Thanks much for all your help. (? ) and (. ) both worked fine. I used (? ) The (?) where ? equals any letter does not have to be at the end of the line. It
      Message 2 of 10 , Sep 7, 2008
        Thanks much for all your help.

        \(?\) and \(.\) both worked fine. I used \(?\)

        The (?) where ? equals any letter does not have to be at the end of
        the line. It just happens to be there (I mentioned that in case that
        offered other possibilities in the clip).

        Thanks again you all saved me hours of work as last year I had to
        manually delete lines that did not contain (?)
      • Axel Berger
        ... That s funny. Thickheaded dumbass that I am, I had misunderstood you were looking for an actual question mark and not some letter in that space. A question
        Message 3 of 10 , Sep 7, 2008
          gunnisonbirder wrote:
          > \(?\) and \(.\) both worked fine.

          That's funny. Thickheaded dumbass that I am, I had misunderstood you
          were looking for an actual question mark and not some letter in that
          space. A question mark as placeholder is not a regex syntax I'm
          aware of. Still, glad everything works now.

          Axel
        • gunnisonbirder
          ... As it turned out (? ) and (. ) don t both seek out one letter. Since most of my lines were (one letter) both clips appeared to work. I accidentally had
          Message 4 of 10 , Sep 8, 2008
            --- In ntb-clips@yahoogroups.com, Axel Berger <Axel-Berger@...> wrote:
            >
            > gunnisonbirder wrote:
            > > \(?\) and \(.\) both worked fine.
            >
            > That's funny. Thickheaded dumbass that I am, I had misunderstood you
            > were looking for an actual question mark and not some letter in that
            > space. A question mark as placeholder is not a regex syntax I'm
            > aware of. Still, glad everything works now.
            >
            > Axel
            >

            As it turned out \(?\) and \(.\) don't both "seek out" one letter.
            Since most of my lines were (one letter) both clips appeared to work.
            I accidentally had one line with (two letters).
            \(?\) returned one and two letters in the parentheses while
            \(.\) returns lines with only one letter in the parentheses (which is
            what I needed).

            Thanks again for all the help! I was able to look at all the examples
            and write two additional clips that reduced my working time even more.
          Your message has been successfully submitted and would be delivered to recipients shortly.