MARCEDIT-L Archives

August 2011

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:
Andy Helck <[log in to unmask]>
Reply To:
MarcEdit support in technical and instructional matters <[log in to unmask]>
Date:
Thu, 25 Aug 2011 03:15:51 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (50 lines)
Hi Rosalie,

maybe someone else will have the answer you need..but if I understand your posting properly you have an interesting problem. it is not a big deal to extract the day, month and year from your existing format of mm/dd/yyyy. Any number of regular expressions can pull out the 3 fields and allow you to create a replacement string using just the year. Based on this, its not too big a stretch to also create a regular expression that recognizes a range of dates (mm/dd/yyyy - MM/DD/YYYY) in the same format. Again, once you pull in all the fields (month, day, year) you can easily enough compose a replacement string that uses just the fields that you want to retain.

The tough part comes from your second example, where a date range that happens to be contained in a single calendar year shows up not as the redundant range "2000 - 2000", but is magically shortened to "2000." This seems like the tricky part. Not impossible, just tricky. you are going to have to create a regular expression that recognizes those specific ranges where the year is the same in the beginning of the range as in the end of the range, and compose the replacement string accordingly.  You might well need a set of find/replace strings (rather than just one) that will accomplish your task.

Maybe someone else has a better solution than what I have outlined, so I won't post examples right now...but if no one has a "magic bullet" solution I will be happy to try to come up with some specific regular expressions that you might try.

Yours,

Andy Helck
Wilkinson Public Library
Telluride CO 81435
________________________________________
From: MarcEdit support in technical and instructional matters [[log in to unmask]] on behalf of Rosalie Martin [[log in to unmask]]
Sent: Wednesday, August 24, 2011 5:26 PM
To: [log in to unmask]
Subject: [MARCEDIT-L] Changing date format with a regular expression

Hello,
Just wondering if someone on the list knows offhand of a regular expression to change the date format for the 260 subfield c. We have a number of EBSCOhost records which have the date appear as:

9/1/2004 -  (for an annual which began in 2004) [change to 2004- ]

12/7/2000 - 12/7/2000 (for a book with date of publication of 2000) [change to 2000]

1/1/2005 - 2/1/2006 (for an annual published between 2005 and 2006) [change to 2005 - 2006]

Any help would be greatly appreciated,
Thanks,
Rosalie

--
Rosalie Martin
Cataloguing Librarian
Electronic Resources Unit
Information Resources Division
Monash University Library
Box 4
Monash University Vic. 3800
Ph. +61 3 99052627

________________________________________________________________________

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]

________________________________________________________________________

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