On Thu, 16 Mar 2023 at 23:29, Glenn Knickerbocker <n...@bestweb.net> wrote:

> On 3/16/2023 4:46 PM, Rob van der Heij wrote:
> > alternatives (with preference for the first one)
> > - line end is any unique sequence of the specified characters, so if you
> > specify the CR and LF as candidate, then CR, LF, CR LF, and LF CR are all
> > one single end of line, but CR CR would imply a null line between (like
> CR
> > LF LF)
> > - the first string of characters from that set is taken as the line end
> > sequence, until eof. So when you start with a bare CR then the next CR
> will
> > cause LF to be the start of a new line.
>
> I like both of these alternatives for different uses--and in both cases,
> it could be useful to have a KEEP operand and/or send the linend off to
> the alternate, to be able to reconstruct the file with the original
> separators.
>

That's why asking just gives me more work...  I still like the ANYOF
keyword to specify the set of characters, and ONCE added to stick with
whatever we got first.
KEEP to include the line end characters in the output stream? Would you
also need a BEFORE and AFTER, or is it good enough to just have them at the
end? You could use STRIP TRAILING ANYOF with the same set.

Rob

Reply via email to