Regex Find & Replace
Knute Johnson
knute2010 at knutejohnson.com
Thu Mar 11 01:24:45 UTC 2010
On 3/10/2010 4:07 PM, NoOp wrote:
> Tried this on the OpenOffice.org users list, but no response yet. So,
> I'm hoping someone here is familiar with Regular Expression& can help:
>
>
>> 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?
>
>
s/m([A-Z])/$1/
--
Knute Johnson
"I say we take off and nuke the entire site from orbit. It's the only
way to be sure." Ellen Ripley, Aliens
More information about the ubuntu-users
mailing list