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

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

Expand Messages
  • Don
    Jun 18, 2011
    • 0 Attachment
      Hi Axel,

      It is part of a longer expression. It is on a single line.
      (.+?) {2,}

      Don't know why I was struggling I guess ... other than I was trying to
      say "anything but two spaces". This works fine -- but is there a way to
      actually say anything but two spaces? Things inside of [ and ] continue
      to baffle me at the moment. How do I say not something specific?

      Thank you for the prompt help!

      On 6/18/2011 11:21 AM, Axel Berger wrote:
      > Don wrote:>
      >> I want to find and capture everything and anything unless until I
      >> encounter two spaces in a row ...
      >
      > You don't specify how general you need it to be. There may be more than
      > one of those several space markers or none and the marker may be more
      > than two spaces in a row. And you will need to find more than one line,
      > I think. This caters for all of these:
      >
      > ^!Jump TEXT_START
      > :loop
      > ^!Find "(?s)(.+?)( {2,})" RSTI1
      > ^!IfError rest
      > ^!Continue
      > ;^!MoveCursor 2
      > ^!Find "(?s)( {2,})" RSTI
      > ^!Jump SELECT_END
      > ^!Goto loop
      > :rest
      > ^!Find "(?s)(.+)" RSTI
      > ^!Continue
      >
      > 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