in reply to Re^4: regex to add network line-endings if required.
in thread regex to add network line-endings if required.
As for only needing line endings, since each of these could be the marker for a line ending, one could only know the difference if the source of the original line is known. In the case that one knows the line ending which needs to be fixed, one would only need to fix that type of line ending. Since multiple types of line endings need to be addressed, there must not be an idea of "end of line" within the strings themselves other than the line ending sequences. If there's some other way to know what is a line, via some outside data, then things could be different. The whole idea of what is a line according to the application in question may require more thought, but that information has not been provided here.
|
|---|