Apache OpenOffice (AOO) Bugzilla – Issue 95029
Replace regular expression with blank string is recursive
Last modified: 2013-01-29 21:51:01 UTC
When searching for a regular expression, and replacing with a blank string, both "Replace" and "Replace All" recursively replace the search string. If you enter any replacement text, it appears to work properly, but replacing with a blank string results in the incorrect behavior. For example, enter a couple of lines with repeating "a" characters, then do a regular expression search for "^aa", leaving the "Replace With" box blank. When you do a "Replace" or "Replace All", it will correctly remove the first two "a" characters from the line, but then it will check that same line again and remove the next two; it will repeat this until there are less than two "a" characters at the beginning of the line, and only then will it move to the next line. If you enter anything in the "Replace With" box, even if you enter "aa", it will correctly only replace once then move on to the next line.
Created attachment 57179 [details] Description and tests for defect "Replace regular expression with blank string is recursive"
In case it matters, I originally noticed this behavior a few days ago in version 2.4.1, then tested and verified the behavior in version 3.0.
Reassigned to SBA.
confirmed
*** Issue 96868 has been marked as a duplicate of this issue. ***