[Bug 165931] Regular expressions must be able to match non-break line endings
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Fri Mar 28 14:57:03 UTC 2025
https://bugs.documentfoundation.org/show_bug.cgi?id=165931
--- Comment #4 from Eyal Rozenberg <eyalroz1 at gmx.com> ---
(In reply to Mike Kaganski from comment #2)
> This is another "I claim people need it, without telling why" request.
(In reply to Heiko Tietze from comment #3)
> Second the missing use case argument. And what exactly is a "non-break line
> ending"? CR/LF for sure not.
I'm sorry, I mistakenly assumed it was somewhat-obvious to everyone because it
was very obvious to me; which, indeed, is an occasional failing of mine. So,
let me spell out what I mean.
=====
Use case: The user wants to locate some quote or piece of text in their
document, and while they don't remember the text exactly, they do remember it
had a certain word or phrase at the end of the line.
=====
You'll agree that this is relatively common, right?
Ok, unwards.
As we write documents, many, or even most, transitions between lines are not
due to breaks inserted by the user (such as paragraph breaks or line breaks),
but rather - stretches of text which are too long to fit on one line, and get
wrapped to additional lines. If a typical paragraph in our document takes up,
say, 4 lines - we have at least 3 ends-of-lines which are not due to a break
and at most one that is.
Additionally, the last (or sometimes single) paragraph within a larger entity,
e.g. a drawing object, does not end with a paragraph break; it ends with the
end of the containing entity.
Given, that many or most lines end without a break, catering to the use case I
listed above requires the ability to indicate that a certain point in a pattern
is located at the end of a line. And - since we can already more-or-less locate
line breaks and paragraph breaks in patterns (with /\n/ and /$/ respectively),
being able to locate an end-of-content end-of-line and a wrap end-of-line, say
with pattern FOO and BAR, will "complete the series", and then we would be able
to say /(\n|$|FOO|BAR)/ to match _any_ end-of-line.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Libreoffice-ux-advise
mailing list