Issue 107194

Summary: Regexp: Search for '\<' pattern breaks replace with '$n' pattern
Product: Writer Reporter: bormant <bormant>
Component: editingAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: helenrussian, issues
Version: OOO320m5   
Target Milestone: ---   
Hardware: Unknown   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

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.