MARCEDIT-L Archives

July 2016

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:
Jeff Edmunds <[log in to unmask]>
Reply To:
MarcEdit support in technical and instructional matters <[log in to unmask]>
Date:
Thu, 21 Jul 2016 12:53:35 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (32 lines)
Can anyone suggest a regex that would flip several flavors of inconsistent date date into simply YYYY?

In other words, I have

1968
Jan 1968
Jul 1967
Mar 1965
"1 Mar 1966"
"31 Apr. 1968"
Sep. 1966

and I want to end up with

1968
1968
1967
1965
1966
1968
1966

Stated differently, I want to strip out everything but the (always 4-digit) year. There are no other instances of 4 consecutive digits in the data.

Thanks,

Jeff

________________________________________________________________________

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