to reproduce (notepad3 v5.20.915.1) have
line1
line2
open the Replace (ctrl+H) dialog
check Regular expression search
for Search String use: .*
for Replace with use: test
click Replace All button
Notepad3 reports 4 changes were made (?!?)
resulting text is:
testtest
testtest
(Also strange is that the Occ count shows "5" before the replacement is performed)
It seems that Oniguruma Regex Engine got wrong settings: carriage-return (CR) (\r) control-character is no longer recognized as part of Windows line-break tupel. If you activate "View->Show Line Endings (Ctrl+Shift+9), you will see what happened.
Hello @np3fan ,
Feel free to test the "BETA/RC paf" version "Notepad3Portable_5.20.1012.2_beta.paf" or higher, see below or issue #1129.
"Notepad3Portable BETA/RC paf" version can be used with or without ".7z" extension.
To update your "Notepad3 Setup" version with the latest features/fixes from the "BETA/RC" version, see issue #1105.
Also, feel free to test the "BETA/RC Setup" version "Notepad3_5.20.1012.2_beta_Setup" or higher, see below or issue #1129.
Comments and suggestions are welcome... 馃槂
Oniguruma RegEx engine has been designed for Unix line-breaks NEW_LINE (LF, '\n', 0x0A). The NEWLINE_CODE macro can be used to change this line-break character to CARRIAGE_RETURN (CR, '\r', 0x0D) for Macs. Also a compile switch exists, which turns the Unix engine into a Windows line-break (CRLF, "\r\n") detecting engine. But not a flexible one: switching between engines by runtime option. So I need to enhance the engine to be able to handle different kinds of Line Endings.
Hope I found all related code branches to handle this correctly.
_Limitations_:
CR or only LF or only CRLF.LF, CR, CRLF) Unicode line-break code points.This looks like a very useful addition, thanks for investigating @RaiKoHoff.