<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - Search & Replace : Replacedoesn't work with positive lookaround regex"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=133084">133084</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Search & Replace : Replacedoesn't work with positive lookaround regex
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>6.4.3.2 release
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Writer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>libreoffice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>blank15927@protonmail.com
</td>
</tr></table>
<p>
<div>
<pre>Description:
LibreOffice ignores the replacement string when there is a regex positive
lookahead/lookbehind in the search field.
Steps to Reproduce:
1. Open a new ODT file in Writer
2. Type, for example, the following string : abbc
3. Open dialog Search & Replace
4. Regular expression Checked
5. Search for : (?<=a)b
6. Replace with : X (or whatever)
Actual Results:
LibreOffice find the first "b", but do not replace it. Replace is broken.
Expected Results:
Replace the first "b" with "X" : String should be now : aXbc
Reproducible: Always
User Profile Reset: No
Additional Info:
Step 5/6 can be reproduced with a positive lookahead :
Search for : b(?=c)
Replace with : X
Same thing : the string (last "b") is not replaced
-----------------------------
Interesting : negative lookahead/lookbehind work as expected.
Example : (?<!a)b or b(?!c)
-----------------------------
Version: 6.3.4.2 (x64)
Build ID: 60da17e045e08f1793c57c00ba83cdfce946d0aa
Threads CPU : 8; OS : Windows 10.0; UI Render : GL; VCL: win;
LocaleĀ : fr-FR (fr_FR); Langue IHM : fr-FR
Calc: threaded</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>