Issue 113275

Summary: error in ReplaceAll with backreferences.
Product: Calc Reporter: joancodina <joan.codina>
Component: editingAssignee: AOO issues mailing list <issues>
Status: CLOSED DUPLICATE QA Contact:
Severity: Trivial    
Priority: P3 CC: elish, issues, j.nitschke, jes
Version: OOO320m19   
Target Milestone: ---   
Hardware: PC (x86_64)   
OS: Linux, all   
Issue Type: DEFECT Latest Confirmation in: 4.0.0
Developer Difficulty: ---

Description joancodina 2010-07-20 10:32:16 UTC
in calc I have a cell with the following message

toyota|toyota|NC quiere|querer|VM sacar|sacar|VM avensis|avensis|NC 

and if I do a replace All with regular expressions where the fields are
search for:"([^ |]+)\|([^ |]+\|[^ |]+)"
replace with: $1

the text i get is
"toyota toyota toyota toyota" 
instead of
"toyota quiere sacar avensis"
what i get if I execute replace many times (instead of replace all)
so it seems that the backreference maintains each value per cell not per martch
Comment 1 Edwin Sharp 2013-04-05 12:50:22 UTC
As given in description.
Comment 2 Joe Smith 2014-03-26 15:40:57 UTC
I believe this the same problem reported in bug 107619

I see the same problem still exists in AOO 4.0.1 and 4.1 (dev build)
Comment 3 j.nitschke 2014-03-26 16:02:00 UTC
(In reply to Joe Smith from comment #2)
> I believe this the same problem reported in bug 107619
> 
> I see the same problem still exists in AOO 4.0.1 and 4.1 (dev build)

yes, thank you.
This bug describes same behavior as bug 107619, comment 0 first example

after first replace the match isn't updated for the next replacement so the first match is always used as replacement

*** This issue has been marked as a duplicate of issue 107619 ***