Issue 118723 - ICU regexp replace: reference of group like $1 in replace text, is always empty
Summary: ICU regexp replace: reference of group like $1 in replace text, is always empty
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: 3.4.0 Beta (OOo)
Hardware: PC All
: P4 Normal (vote)
Target Milestone: ---
Assignee: writerneedsconfirm
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-04 10:23 UTC by hanya
Modified: 2017-05-20 10:32 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description hanya 2012-01-04 10:23:22 UTC
Reference a group like $1 in replace text do not work anymore with the regexp engine replaced with ICU's one.

Here is an example to reproduce: 
Text: ab
Search for: a(b)
Replace with: $1

Results empty string, it should be "b". This works on OOo 3.3.0.
The history of the modification in Undo button shows "Replace: 'ab' -> ''" means 
$1 is empty. When I change the replace text to $0, it worked.
Comment 1 Oliver Brinzing 2012-01-05 12:18:39 UTC
.
Comment 2 hdu@apache.org 2012-01-06 11:14:22 UTC
Fixed with r1228084