Closed np3fan closed 7 months ago
There seems to be a difference between RegEx-Engines:
Some engines treat the CR
(Carriage-Return character) not as line-break and the dot (.) can match this character (Visual Studio 2022 does so).
Some other engines treat the CR
(or CR``LF
combi ?) as the line-break and the dot (.) does not match the CR
(VS Code does so).
So, I am not sure, what should be the correct behavior - besides my expectations.
We changed it (PR #5116), preferring VSCode behavior
Hello @np3fan ,
Feel free to test the "BETA/RC PortableApps", version "Notepad3Portable_6.24.227.1_rc2.paf" or newer, see in issue #1129.
"Notepad3Portable BETA/RC PortableApps" version can be used with or without ".7z" extension.
Also, feel free to test the "BETA/RC Setup", version "Notepad3_6.24.227.1_rc2_Setup" or newer, see the 2nd list in issue #1129.
Comments and suggestions are welcome... 😃
A regex to find character X in the middle of a line, but not the start or end:
^.+X.+$
This matches the line thisXthat
but also matches the line XhelloX
It should not match the latter line.
As a second example, this regex:
A.$
should match two characters however for text A AA AAAall lines match. The problem seems to exist when using CR+LF but not when using LF. Enabling Show Line Endings for this example shows some of the problem.