Ignoring empty lines counting
- 
I’ll create an issue if you haven’t already…
The issue that was opened:
https://github.com/notepad-plus-plus/notepad-plus-plus/issues/13608
 - 
Hi, @mark-olson, @alan-kilborn and All,
Did you notice this fact :
- The regex 
^$, indeed, does not count true empty lines ! 
but :
- The regex 
^\Rdoes count empty lines !! 
BR
guy038
 - The regex 
 - 
@guy038 said in Ignoring empty lines counting:
The regex ^$, indeed, does not count true empty lines !
but :
The regex ^\R does count empty lines !!
If the regex is purely an assertion, e.g.
^$or\b(to name but two), then its match won’t be counted by Count. - 
@Alan-Kilborn said in Ignoring empty lines counting:
@guy038 said in Ignoring empty lines counting:
The regex ^$, indeed, does not count true empty lines !
but :
The regex ^\R does count empty lines !!
If the regex is purely an assertion, e.g.
^$or\b(to name but two), then its match won’t be counted by Count.True (since a pure assertion is always an empty match), but empty matches aren’t counted regardless of how the regular expression is specified. In a file that has empty lines, but no lines containing only capital Ws,
^W*$counts zero matches.^\Rcounts all empty lines (except the last line, if it’s empty) because it isn’t an empty match: it matches line ending characters.^.*$and^.+$both count all lines that are not empty.