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

24128Re: [Clip] REGEX Search Backward

Expand Messages
  • Axel Berger
    Nov 2, 2013
      nullclip@... wrote:
      > The regex finds and highlights only www.logicalchess.com/ instead of
      > the full http://www.logicalchess.com/.

      Yes, John already mentioned that problem himself. If the start can be
      either http or www and the term before is greedy, then you'll capture as
      little as possible. To solve this you have to look at what always comes
      directly before your string. It may be an equals (=) or a quote, if the
      URL is always placed in quotes. Assuming the latter I get:

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

      As you never specified what comes outside your search string, I had to
      guess here.

    • Show all 25 messages in this topic