At 13:47 10/03/2010 -0800, Gary Noop wrote:
Sorting through a flat data file (GEDCOM genealogy database file) in Writer (3.2 - linux) and I am attempting to find and replace the following:

lowercase m preceded by a space and followed by uppercase A-Z.

Example:
 (space)mAnderson
replace as
 (space)Anderson

I found that I can easily _find_ using:
 m[A-Z]
but can't figure out how to replace the 'm' with a space and leave the following A-Z letter in place.

Any suggestions on how I accomplish this?

Yes: just enclose the part you want to keep in parentheses; you can then refer to that in the "Replace with" field. Search for:
 m([A-Z])
and replace with:
 $1
- where both those strings have a leading space, of course. The "$1" in the "Replace with" field refers to the first (here the only) parenthesised reference in the "Search for" string. So the replace string is a space followed by whatever capital letter was matched by your [A-Z].

You will need to have both "Match case" and "Regular expressions" ticked, of course - but you knew that.

I trust this helps.

Brian Barker


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@openoffice.org
For additional commands, e-mail: users-h...@openoffice.org

Reply via email to