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

14283Re: [Clip] RegExp For Formatting Paragraphs

Expand Messages
  • rpdooling
    Sep 27 8:29 AM
    • 0 Attachment
      Roy,

      I played with this to solve the common problem of getting text or a
      doc where the paragraphs end in hard returns and there are no blank
      lines separating paragraphs.

      ^!REPLACE "{[.!?"]}$" >> "\1\n" ritswa

      Works great, unless the line ends in no punctuation at all.

      Is there a way to search within NoteTab for lines of a certain length?
      I notice that the RegExp quantifiers {n} are not possible because
      NoteTab uses those for "tagged matches" as above.

      Thanks for the great snippet of useful code.

      Rick

      --- In ntb-clips@yahoogroups.com, "Roy Herring" <roynancy@e...> wrote:
      > Al,
      >
      > This will work on your next doc even with trailing white spaces.
      > ^!REPLACE "{[.!?]}\b*$" >> "\1\n" ritswa
      >
      > Roy
      >
      > ----- Original Message -----
      > From: "acantley5" <acantley@i...>
      > To: <ntb-clips@yahoogroups.com>
      > Sent: Monday, June 06, 2005 7:57 AM
      > Subject: Re: [Clip] RegExp For Formatting Paragraphs
      >
      >
      > > Roy,
      > >
      > > Your expressions worked for some paragraphs but not for those that
      > > end with the ., !, or plus white space? It worked perfectly after I
      > > first trimmed blanks from the whole document. Thanks.
      > >
      > > Al
      > >
      > > --- In ntb-clips@yahoogroups.com, "Roy Herring" <roynancy@e...>
      > > wrote:
      > >> Al, try this:
      > >> ^!REPLACE "{[.!?]}$" >> "\1\n" ritswa
      > >>
      > >> Input:
      > >> XX.
      > >> YY
      > >> XX!
      > >> YY
      > >> XX?
      > >> YY
      > >>
      > >> Output:
      > >> XX.
      > >>
      > >> YY
      > >> XX!
      > >>
      > >> YY
      > >> XX?
      > >>
      > >> YY
      > >>
      > >> Roy
      > >>
      > >
      > >
      > >
      > >
      > >
      > > Fookes Software: http://www.fookes.us, http://www.fookes.com
      > > Fookes Software Mailing Lists: http://www.fookes.us/maillist.htm
      > >
      > > Yahoo! Groups Links
      > >
      > >
      > >
      > >
      > >
      > >
      > >
      > >
    • Show all 6 messages in this topic