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

Beginner question on Clip search

Expand Messages
  • Celtics2000
    Hi! At the very end of a document(past all of the text)I want to create a Clip to find the nearest non-whitespace character BEFORE it. After reading the help I
    Message 1 of 7 , Apr 6, 2012
    • 0 Attachment
      Hi!

      At the very end of a document(past all of the text)I want to create a Clip to find the nearest non-whitespace character BEFORE it.

      After reading the help I thought this would be the code.

      ^!FIND \S RB

      It still searches forward. I thought the B was supposed to reverse it. What am I doing wrong?

      Thanks!

      Cliff
    • hsavage
      ... Cliff, In the command ^!FIND S RB, the R denotes regex and the B denotes backward search, I believe you ll find that regex does not search backward. --
      Message 2 of 7 , Apr 6, 2012
      • 0 Attachment
        On 4/6/2012 4:51 PM, Celtics2000 wrote:
        > Hi!
        >
        > At the very end of a document(past all of the text)I want to create a Clip to find the nearest non-whitespace character BEFORE it.
        >
        > After reading the help I thought this would be the code.
        >
        > ^!FIND \S RB
        >
        > It still searches forward. I thought the B was supposed to reverse it. What am I doing wrong?
        >
        > Thanks!
        >
        > Cliff

        Cliff,

        In the command ^!FIND \S RB, the R denotes regex and the B denotes
        backward search, I believe you'll find that regex does not search
        backward.

        --
        ···············································
        ¤• JD#...97 - ¤• SL...772 - 12.04.06~09.49.04

        • In Only 30 Years...
        • 1977:> Acid Rock
        • 2007:> Acid Reflux

        € hrs € hsavage € pobox € com
      • Don
        Regular expressions only work forwards. That particular thing is not possible to be done that way. However you can do a multi-line search finding everything
        Message 3 of 7 , Apr 6, 2012
        • 0 Attachment
          Regular expressions only work forwards. That particular thing is not
          possible to be done that way.

          However you can do a multi-line search finding everything up to the last
          white space.



          >
          > After reading the help I thought this would be the code.
          >
          > ^!FIND \S RB
          >
          > It still searches forward. I thought the B was supposed to reverse it. What am I doing wrong?
          >
          > Thanks!
          >
          > Cliff
        • diodeom
          ... Try the following: ^!Find S(?= s*+ Z) WRS The parenthesized section is a look-ahead (to exclude its target from capture): S -- non-whitespace char (?=
          Message 4 of 7 , Apr 6, 2012
          • 0 Attachment
            Celtics2000 wrote:
            >
            > Hi!
            >
            > At the very end of a document(past all of the text)I want to create a Clip to find the nearest non-whitespace character BEFORE it.
            >

            Try the following:

            ^!Find ""\S(?=\s*+\Z)" WRS

            The parenthesized section is a look-ahead (to exclude its target from capture):

            \S -- non-whitespace char
            (?= -- ahead of...
            \s*+ -- any number of whitespace
            \Z -- at the end

            Dio
          • diodeom
            ... Sorry, an extra quotation mark sneaked up on me. It should be: ^!Find S(?= s*+ Z) WRS
            Message 5 of 7 , Apr 6, 2012
            • 0 Attachment
              I wrote:
              >
              > ^!Find ""\S(?=\s*+\Z)" WRS
              >

              Sorry, an extra quotation mark sneaked up on me. It should be:

              ^!Find "\S(?=\s*+\Z)" WRS
            • Celtics2000
              Thanks all for your help!
              Message 6 of 7 , Apr 10, 2012
              • 0 Attachment
                Thanks all for your help!



                --- In ntb-clips@yahoogroups.com, "Celtics2000" <cliffsss@...> wrote:
                >
                > Hi!
                >
                > At the very end of a document(past all of the text)I want to create a Clip to find the nearest non-whitespace character BEFORE it.
                >
                > After reading the help I thought this would be the code.
                >
                > ^!FIND \S RB
                >
                > It still searches forward. I thought the B was supposed to reverse it. What am I doing wrong?
                >
                > Thanks!
                >
                > Cliff
                >
              • Celtics2000
                This is working great! I cannot thank you enough!
                Message 7 of 7 , Apr 11, 2012
                • 0 Attachment
                  This is working great! I cannot thank you enough!

                  --- In ntb-clips@yahoogroups.com, "diodeom" <diomir@...> wrote:
                  >
                  > I wrote:
                  > >
                  > > ^!Find ""\S(?=\s*+\Z)" WRS
                  > >
                  >
                  > Sorry, an extra quotation mark sneaked up on me. It should be:
                  >
                  > ^!Find "\S(?=\s*+\Z)" WRS
                  >
                Your message has been successfully submitted and would be delivered to recipients shortly.