I\'ve tried (^\\r)\\n
but this doesn\'t work.
How do you do this?
(I appreciate that in Java-like code you need to use (^\\\\r)\\\\n
Depending on your requirements:
[^\r]\n
- linefeed that is preceded with any character but a carriage return. This means there must be a character before the linefeed and two symbols will be matched. (? - linefeed that is not preceded with a carriage return. This means there only newline symbol will get matched and \r
will only be tested for presence (as (? is a negative lookbehind, a zero-width assertion that does not consume any text, but returns true if the pattern inside it is absent right before the current position in the string).
For a demo, please check these two links:
\r\n
there.