Darrell Fuhriman writes:

> Should getting the actual characters be treated differently from
> getting the \r\n representation of those characters?

Which characters?  The representation \r denotes a carriage return, aka
character \x0D.

Whereas \n denotes a 'new line', a virtual concept which is made up of
some concept of some combination of line feeds (\x0A) and carriage
returns, in an attempt to cope with the hateful different ways OSes have
denoted line breaks.

It isn't possible to have an 'actual' \n character; all actual
characters will be specific, not conceptual.

If you meant that after the carriage return the search would match a
line feed character (and nothing else) then you need to specify that,
such as with /\r\x0A/ or /\x0D\x0C/ or /\cM\cJ/.

But it is hateful that there isn't a single-character code for line
feed, equivalent to \r -- especially since on Unix when asked to output
\n, a line feed is what gets emitted, thereby making people think that
\n denotes a line feed.

Smylers

Reply via email to