RootsWeb.com Mailing Lists
Total: 1/1
    1. Re: Search and replace in one field
    2. Charlie Hoffpauir
    3. On Thu, 21 Feb 2013 00:01:22 -0500, "T.M. Sommers" <tmsommers2@gmail.com> wrote: >On 2/19/2013 7:15 PM, Dennis Lee Bieber wrote: >> >> PS E:\UserData\Wulfraed\My Documents> get-content e:\sample.ged >> 0 @I1@ INDI >> 1 NAME Gerald "Bernard" /Landry/ >> 2 GIVN Gerald "Bernard" >> 2 SURN Landry >> 1 SEX M >> 1 BIRT >> 2 DATE 9 MAR 1937 >> 2 PLAC St-Jacques >> 0 @I2@ INDI >> 1 NAME Bernard /St-Jacques/ >> 2 GIVN Bernard >> 2 SURN St-Jacques >> 1 SEX M >> 1 FAMS @F1@ >> >> PS E:\UserData\Wulfraed\My Documents> get-content e:\sample.ged | >> foreach {$_ -replace '(.*) NAME (.*) "(.*)" (.*)', '$1 $2 ~$3~ $4' >> -replace '(.*) GIVN (.*) "(.*)"', '$1 GIVN $2 ~$3~'} >e:\new.ged >> >> PS E:\UserData\Wulfraed\My Documents> get-content e:\new.ged >> 0 @I1@ INDI >> 1 Gerald ~Bernard~ /Landry/ > >You left out the NAME tag. Yeah, but that was easy to fix. As a beginner, this looks very impressive.

    02/21/2013 01:39:51