Bug 47659 - EDITING: Search&Replace with Regexp fails on multiple match
Summary: EDITING: Search&Replace with Regexp fails on multiple match
Status: RESOLVED DUPLICATE of bug 44861
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-21 07:42 UTC by Ninj
Modified: 2012-12-25 15:33 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ninj 2012-03-21 07:42:10 UTC
Problem description: 
When searching with regexp, and replacing (all) using references ($1...), if the string of a cell has multiple matches, only the first replacement works. Following ones fail because the replacement reference is incorrect.

The problem only occurs with "replace all".

Steps to reproduce:
1. In a cell, enter this string: "123_456"
2. Open the search box, check "regular expressions", and enter the following:
Search: ([:digit:]{3})
Replace: $1
3. Click "Replace all"

Current behavior:
The value of the cell becomes 123_123

Expected behavior:
The value of the cell should be 123_456

NOTE: the original case in which the bug was found was more complicated and leaded to even more weird results. Here it is in case it helps:
http://nabble.documentfoundation.org/Calc-Bug-in-Search-replace-with-regexp-tc3844337.html

Platform (if different from the browser): 
Windows 7 64bit
              
Browser: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0
Comment 1 Timur 2012-04-09 02:49:29 UTC
This looks like a duplicate of Bug 44861.

*** This bug has been marked as a duplicate of bug 44861 ***