PreviousNextTracker indexSee it online !

(240/247) 4009 - \r not handled by jedit in regex, comes out replaced as r

\r not handled by jedit in regex, comes out replaced as r.
jedit 5.3.1, latest java with jdk8u102, vista32

this is a Bible.txt file where verses are broken up onto multiple lines. I am trying to convert it to a verse-per-line Bible, but without errors in the conversion. every verse begins with \1f and every line ends with \r\n which is standard for terminal text many years ago. \r is carriage return and \n is linefeed. a cr+lf is needed to put the cursor on a new line at the beginning of the line. both unix,linux, and macos break this rule.

search for \r\n
replace with nothing
search for \1f (special Bible text)
replace with \r\n

expected: \r\n at end of every line

actual: \r comes out as an r and \ is ignored. could be trying to replace with for \\r instead of \r (strange internal search and replace?)

an easy way to convert all text files to the correct EOL format cr+lf (\x0d\x0a) is to do some simple search and replaces:
search: [\r\n]
replace: \r
search: \r
replace: \r\n or \x0d\x0a

Submitted jmichae3 - 2016-07-29 01:08:23.309000 Assigned
Priority 5 Labels
Status open Group minor bug
Resolution None

Comments