Issue 107194 - Regexp: Search for '\<' pattern breaks replace with '$n' pattern
Summary: Regexp: Search for '\<' pattern breaks replace with '$n' pattern
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: editing (show other issues)
Version: OOO320m5
Hardware: Unknown All
: P3 Trivial with 1 vote (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-25 09:33 UTC by bormant
Modified: 2013-01-29 21:53 UTC (History)
2 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 bormant 2009-11-25 09:33:42 UTC
Regexp search pattern '\<' breaks the replace pattern '$n' on the second and 
more matches in a paragraph.

Tested with: OOo-dev OOO320m5, OOo.3.1.1, OOo.2.4.3
Affected: OOo-dev OOO320m5, OOo.3.1.1, OOo.2.4.3

OS doesn't matter.

How to reproduce:

1) create new text document (Writer)

2) type in 2 paragraphs:
a word b word c word
a word b word c word

3) Ctrl+F
search for: (\<[a-c])[:space:]+
replace with: $1<nbsp>
[ more options vv ]
[x] regular expressions
[Replace All]

4) results

expected: 
a<nbsp>word b<nbsp>word c<nbsp>word
a<nbsp>word b<nbsp>word c<nbsp>word

actual:
a<nbsp>word $1<nbsp>word $1<nbsp>word
a<nbsp>word $1<nbsp>word $1<nbsp>word

We can see that literal '$1' was used on second and subsequent matches in 
paragraph instead of actual matched content of '()' ('b' and 'c').

Result as expected when search for "([a-c])[:space:]+" (without '\<' pattern).
Comment 1 eric.savary 2009-11-25 19:24:59 UTC
Reassigned to SBA
Comment 2 inspirra 2010-02-24 05:00:24 UTC
Hello developers.
I encountered the same problem. Why have not confirmed this bug?

Sorry for my English.
Comment 3 helenrussian 2010-03-31 08:53:02 UTC
Confirm with OOo 3.2, Linux.