Word wrapping in word processors and even email editors makes the definition
of PARAGRAPH given below by Joel questionable, IMHO. Thinking about it, I
recognize the start of a new paragraph in literature by the presence of a
blank or empty line. Thus the sequence of two "new line" control characters
would signal the start of a new PARAGRAPH. I think this is beyond the scope
of the simple-parse approach. The more complex rule based functional
approach developed in this thread by others is required.
I guess the person trying to solve this paragraph parse problem is in the
best position to define what he means by "paragraph". As I recall the
original problem, paragraphs *were* defined "according to Joel".
.Russell [EMAIL PROTECTED]
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 21, 2000 5:08 AM
Subject: [REBOL] parse or Re:(6)
> I don't think that just breaking on {^/} solves the problem as posted.
> The objective, as I read it, was to break on PARAGRAPHS (not lines)
> where a paragraph is defined as the end of a sentence that concides
> with the end of a line. In other words, there shouldn't be a break
> between lines that contain two (or more) parts of a multiple-line
> sentence.
>
> -jn-
>
> [EMAIL PROTECTED] wrote:
> >
> > So what? Seems the application that's going to use the block of
paragraphs
> > could easily deal with the "" for an empty paragraph. To me, that's
> > preferable than trying to outguess the final character of every
conceivable
> > paragraph!
> >
> > Russell [EMAIL PROTECTED]
> > ----- Original Message -----
> > From: <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, September 20, 2000 10:00 PM
> > Subject: [REBOL] parse or Re:(4)
> >
> > > Ahh, but this is not enough, because if the report has more than one
> > newline
> > > character following a paragraph, you will end up with empty
paragraphs.
> > >
> > > >> But what if I'm trying to parse a report and wish to make each
> > > >> paragraph a separate string within a block?
> > > >
> > > >Simple parsing with the /all refinement will do this in one step.
The
> > /all
> > > >refiinement disables all the default delimiters and uses only the
> > supplied
> > > >string of characters to break apart the target string. In this case,
> > we'll
> > > >use the control character "^/", end of line, commonly used to end a
> > > >paragraph.
> > > >
>
>