On Wednesday, July 29, 2015 3:00 PM, Marcia Lubansky wrote:
>Request for regular expressions
>I receive MARC records for our eAudio titles from 3M. These vendor records are machine-generated and need some work. Is it possible for a regular expression to fix this?
>In tag 245
>/$cMiller, Daniel A.
>to
>/$cDaniel A. Miller.
> Or:
>/$cMyers, Walter Dean.
>to
>/$cWalter Dean Myers.
>Again, here is my 511 tag:
>=511 1\$aTucker, Jeff
>I can correct the indicator, add end punctuation, etc. But is it possible to flip the name? In this case to: $aJeff Tucker
If all of your records are as straight-forward as these (each containing only a single name per field), then:
Find: ([^,]+), ([^\.]+)
Replace with: $2 $1
should work for the name portions (after isolating the find/replace to the specific subfields you wish--using Edit Subfield, for example). For the 245$c Edit subfield, I had to use:
c([^,]+), ([^\.]+)
because it appears the Field Data portion includes the subfield character rather than starting after that character.
As a result, a more universal expression would be:
Find: (.)([^,]+), ([^\.]+)
Replace with: $1$3 $2
The above expressions don't completely work for your examples--the "A." will lack a period; it's difficult to determine when the ending period would be for the abbreviation vs. end-of-field period.
However, if any of the subfields involved have more than 1 name, then I'm not sure what I would do.
I hope this helps,
Bryan Baldus
Senior Cataloger
Quality Books Inc.
The Best of America's Independent Presses
1-800-323-4241x402
[log in to unmask]
________________________________________________________________________
This message comes to you via MARCEDIT-L, a Listserv(R) list for technical and instructional support in MarcEdit. If you wish to communicate directly with the list owners, write to [log in to unmask] To unsubscribe, send a message "SIGNOFF MARCEDIT-L" to [log in to unmask]
|