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

517Re: [NTS] Re: regular expression to find anything up to two spaces in a row ...

Expand Messages
  • Don
    Jun 21 6:26 PM
      From Regex Buddy (my newest friend ...):

      "Positive lookahead works just the same. q(?=u) matches a q that is
      followed by a u, without making the u part of the match. The positive
      lookahead construct is a pair of round brackets, with the opening
      bracket followed by a question mark and an equals sign. You can use any
      regular expression inside the lookahead. Any valid regular expression
      can be used inside the lookahead."

      If I understand correctly, I can then actually do this:
      (?=( ))
      and create a back-reference if I wish?

      Learning as I go here :-) and it's fun. Thanks Axel and Eb!

      On 6/21/2011 7:54 PM, Axel Berger wrote:
      > Eb wrote:
      >> Actually, I would expect the assertion:
      >> (?= )
      >> to find a string ending in 2 spaces, without including the
      >> two spaces in the match.
      > Yes, you're right and that's probably better than my
      > ^!Find "(?s)(.+?)( {2,})" RSTI1
      > but it has the same problem. Don specified
      >> everything and anything unless until I
      >> encounter two spaces in a row ...
      > which I took to mean the two spaces may or may not occur, as is usual
      > when using negative classes. If they're certain to do, then things get
      > much easier.
      > Axel
      > ------------------------------------
      > Fookes Software: http://www.fookes.com/
      > NoteTab website: http://www.notetab.com/
      > NoteTab Discussion Lists: http://www.notetab.com/groups.php
      > ***
      > Yahoo! Groups Links
    • Show all 13 messages in this topic