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

24125Re: [Clip] REGEX Search Backward

Expand Messages
  • Axel Berger
    Nov 2, 2013
    • 0 Attachment
      nullclip@... wrote:
      > The work-around is to put the cursor at the start of the
      > document or outline topic's text before beginning the search
      > for the last URL.

      Sorry, I can't reproduce that. So far I had only followed the thread
      without trying anything myself but I just ran John's clip on one of my
      HTMLs and it worked out of the box as advertised.

      Two small points:
      As per the help file the "A" is meaningless here, it is only applicable
      for ^!Replace. The relevant part for finding the last occurrance is the
      greedy dot after the \A.
      A slight niggle is that the closing quotes are included while the
      opening ones aren't. John has already posted the correction.

      By the way, as the "W" makes the search start at the beginning of the
      file anyway and the dot doesn't look for anything specific, the \A is
      superfluous here.

      This leaves me with

      ^!Find "(?s).+\K(https?://|www\.)[^\x20"\r\n<>]+" IORSW

      and it doesn't matter where in the files the cursor sits to begin with.

      Axel
    • Show all 25 messages in this topic