MARCEDIT-L Archives

March 2015

MARCEDIT-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Bryan Baldus <[log in to unmask]>
Reply To:
MarcEdit support in technical and instructional matters <[log in to unmask]>
Date:
Mon, 23 Mar 2015 14:47:19 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (29 lines)
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]

ATOM RSS1 RSS2