On 11/5/26 12:50 PM, Kaz Kylheku wrote:

It doesn't seem that this could be misinterpreted or cause puzzlement.
Of course "preceding the backslash" means "preceding the space
representing the removed backslash" and not "preceding the backslash
in its new home location in the bit bucket to which it has been removed". :)

Well, maybe not to you, but it did make me stop and think.
(I used to do freelance editing for O'Reilly, and this is exactly
the kind of thing they wanted to improve.)
This seems logically equivalent to replacing all sequences
which match the regex (\s*(\\\n)+\s*)+ with a single space.

In other words, maybe the requirement can be stated as:
every character sequence which consists of
any mixture of zero or more whitespace characters, and
at least one backslash-newline digraph, is replaced by
a single space.

How about

"If a string contains a sequence of zero or more whitespace characters
and at least one backslash/newline character pair, all these
characters are replaced by a single space."

Jon




Reply via email to