I have a text file that has incorrectly placed line breaks. The position where the line break should be placed goes like this ...xxxXxxx... (every x is a character [a-z] with the capital X being a capital character [a-z]. I want to place the CRLF in front of the capital letter. How do I do it? I can find all these sequences by Find what: [a-z][A-Z][a-z] (match case 1) but I don't know what to type in the Replace with field to keep the original text.
(?<=\p{lower})(?=\p{upper})
\r\n
Explanation:
(?<=\p{lower}) # positive lookbehind, make sure we have a lowercase letter before
(?=\p{upper}) # positive lookahead, make sure we have an uppercase letter after
Replacement:
\r\n # CRLF
Screenshot (before):
Screenshot (after):