Comment 3 for bug 465323

Revision history for this message
jimav (james-avera) wrote : Re: [Bug 465323] Re: $1 etc. do not work in Replace of Find & Replace

Yes, I'm pretty sure Regular Expression was checked.
The example I gave in the bug report is a real example.

Does the example work for you? If so, then there must be some other state setting somewhere which affects this.

The reason I'm sure Regular Expression was checked is that the "(...)" in the search field matched any three characters. If REs were not enabled, it would have only matched literal paren+3dots+paren.

-Jim

----- Original Message ----
From: WeatherGod <email address hidden>
To: <email address hidden>
Sent: Fri, October 30, 2009 4:20:09 PM
Subject: [Bug 465323] Re: $1 etc. do not work in Replace of Find & Replace

Just to be sure, did you check off "Regular expression" under the More
Options pane?

--
$1 etc. do not work in Replace of Find & Replace
https://bugs.launchpad.net/bugs/465323
You received this bug notification because you are a direct subscriber
of the bug.

Status in “openoffice.org” package in Ubuntu: New

Bug description:
Binary package hint: openoffice.org

In Find & Replace, the use of (...) in the Find expression is supposed to create a reference which can be used in the Replace expression via $1 ($2 for the second (...) etc.). At least that is how I read the OO docs on Regular Expressions. It is also how regular expressions work in many other programs.

However, using $1 in the Replace field just puts in a litera "$1" instead of substituting the text from the "Search for" expression.

EXAMPLE:
If the text contains "My dog has fleas", then setting the Search expression to "My (...) has fleas" and the Replace expression
to "My $1 is smart" Should change the text to "My dog is smart". However, the result is "My $1 is smart".

ProblemType: Bug
Architecture: amd64
Date: Fri Oct 30 11:44:35 2009
DistroRelease: Ubuntu 9.10
Package: openoffice.org-core 1:3.1.1-4ubuntu2 [modified: var/lib/openoffice/basis3.1/program/services.rdb]
ProcEnviron:
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-12.41-generic
SourcePackage: openoffice.org
Uname: Linux 2.6.31-12-generic x86_64