How to replace \rwith \r\nif \rnot used \nusing Regex?
Problem
I am having problems with a text editor in Windows that I create in that line breaks are added as \ r. As a result, they are not read as line breaks when I open a file in Notepad.
What i tried
I tried searching everywhere (google, stackoverflow, etc.) for this, but could not find what was specifically for what I needed.
Everything I have tried so far does what I do after the first time, but then saves an unnecessary replacement \r, even if it follows them \n.
For reference, this expression:
"\r(?!^\n)", "\r\n"