[Libreoffice-bugs] [Bug 108256] EDITING: find/replace regular expressions: \n has 2 meanings, it shouldn't

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Sep 22 22:00:01 UTC 2017


https://bugs.documentfoundation.org/show_bug.cgi?id=108256

V Stuart Foote <vstuart.foote at utsa.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vstuart.foote at utsa.edu

--- Comment #5 from V Stuart Foote <vstuart.foote at utsa.edu> ---
(In reply to Daniel Grigoras from comment #4)
> 
> The problem is that there is a misunderstanding as to what a Shift+Enter
> does. Shift+Enter inserts a page break and not a line break as the
> pseudo-help states.
> 

No, it does not. Shift+Enter inserts a "line break", searchable as "\n" or as
"\u000a"

> MS Word also has a "Special" button in the Search & Replace window to easily
> pick regular expressions.
> 

And? Otherwise, we have our own regex syntax drawn from perl as implemented by
ICU.

> Please correct this issue and make \n or \p to represent a paragraph mark.
> 

Not going to happen, the ICU library String search and its regex implementation
meets our needs of manipulating paragraphs.

"$" already is unique representation of the end of a Paragraph object. It has
no meaning in a replacment string--just a search string where it is either the
end of a paragraph object, or for composing a regex match at end of paragraph.

> Use case: I want to search for certain lines containing certain text and
> replace that text together with the line on which that text was placed. I
> can't make any such replacement as \nTextToReplace is not found.

Post an example we'll figure it out for you.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170922/52b9fd35/attachment-0001.html>


More information about the Libreoffice-bugs mailing list