<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:vstuart.foote@utsa.edu" title="V Stuart Foote <vstuart.foote@utsa.edu>"> <span class="fn">V Stuart Foote</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - No regular expression for paragraph mark"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=112575">bug 112575</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>INVALID
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - No regular expression for paragraph mark"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=112575#c6">Comment # 6</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - No regular expression for paragraph mark"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=112575">bug 112575</a>
from <span class="vcard"><a class="email" href="mailto:vstuart.foote@utsa.edu" title="V Stuart Foote <vstuart.foote@utsa.edu>"> <span class="fn">V Stuart Foote</span></a>
</span></b>
<pre>(In reply to Daniel Grigoras from <a href="show_bug.cgi?id=112575#c5">comment #5</a>)
<span class="quote">> $ for paragraph mark is actually counterintuitive.
>
> If \n stands for manual line break, then \p should have been the regular
> expression for a paragraph mark.</span >
No, this is just the way the OOo legacy search and use the ICU based regular
expression syntax has evolved.
LibreOffice implements the ICU string search with current ICU (59.1) libraries:
<a href="http://userguide.icu-project.org/strings/regexp">http://userguide.icu-project.org/strings/regexp</a>
ICU Regex treats "$" as "Match at the end of a line. Line terminating
characters are \u000a, \u000b, \u000c, \u000d, \u0085, \u2028, \u2029 and the
sequence \u000d \u000a."
But there is no ICU regular expression for "paragraph mark" rather that is a LO
defined 'end of paragraph object'--CH_PAR--which are notated in search with $,
and represented on document canvas with Unicode PILCROW glyph (\u00b6) in all
fonts. But you can not search for the PILCROW just the "$" notation.
The "line break"--CH_BREAK-- "\n" symbol, or its Unicode "\u000a" point is
searchable.
And as noted in <a class="bz_bug_link
bz_status_NEW "
title="NEW - EDITING: find/replace regular expressions: \n has 2 meanings, it shouldn't"
href="show_bug.cgi?id=108256">bug 108256</a>, a Replace with "\n" will convert the line break to
a paragraph end mark. Not wrong, just unusual for more adept regex users.
<span class="quote">>
> The issue is that I cannot search for $TextToReplace, while in MS Word I can
> search for ^13TextToReplace and have it replaced with what I want, with
> nothing in this case.</span >
$TextToReplace has no meaning--in ICU regex the $ is last position in the
match.
=-ref-=
ICU (59.1) String search - regexp
<a href="http://userguide.icu-project.org/strings/regexp">http://userguide.icu-project.org/strings/regexp</a>
LibreOffice Help
<a href="https://help.libreoffice.org/Writer/Using_Wildcards_in_Text_Searches">https://help.libreoffice.org/Writer/Using_Wildcards_in_Text_Searches</a>
<a href="https://help.libreoffice.org/Common/List_of_Regular_Expressions">https://help.libreoffice.org/Common/List_of_Regular_Expressions</a>
Note specifics of handling of $ and \n in LibreOffice--the help article is
correct.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>