This should replace both \r\n and \n with \r now. "\r?\n" matches 0 or 1 \r and one \n, which should capture both escape sequences.
This should replace both \r\n and \n with \r now. "\r?\n" matches 0 or 1 \r and one \n, which should capture both escape sequences.