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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login