Subject: | |
From: | |
Reply To: | |
Date: | Mon, 23 Mar 2015 14:47:19 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
On Monday, March 23, 2015 2:15 PM, Patricia Hults wrote:
>I need to right truncate a variable length subfield 5 characters from the end. I think it could be done with a regular expression in the Edit Subfield function, but I can't figure out the syntax. An example would be to truncate 10/1/1990. to 1990. Any suggestions?
You could do:
Field data (with Use regular expression checked): (.+).....$
Replace with: $1
The reg ex should capture everything except the last 5 of anything (represented by '.') in the subfield data as $1. The $ at the end of the reg ex indicates the end of the subfield.
This should be functionally equivalent:
Field data (with Use regular expression checked): (.+).{5}$
######
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]
|
|
|