MARCEDIT-L Archives

September 2010

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:
"Beacom, Matthew" <[log in to unmask]>
Reply To:
MarcEdit support in technical and instructional matters <[log in to unmask]>
Date:
Mon, 27 Sep 2010 13:30:36 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (33 lines)
Hi all,

I've never before written a reg ex and I have what I suspect is a very simple question, but I have not found the existing information on reg exs to be immediately useful in solving this for me.  So I thought I might ask you all for help.

The situation is this. I have converted some OAI Dublin Core records into MARC21 (just using the existing MARCedit stylesheets), and thus I have two 520 fields in the MARC21. The one has a textual note, the other has extent data. For example, "=520  \\$a95 p." So I'd like to find all of those (easy enough with the reg ex--even I could do that), and replace either just the MARC tag "520" with "300" or all of the reg ex _except_ the last character (the numeral). 

When I used a reg ex that I thought might work, MARCedit's find and replace actually just reproduced the character string of the reg ex. That seemed really odd to me. I could understand it not working the way I expected, but it simply used the initial reg ex to find the string to replace and then replaced it with the "replace reg ex" character string.

Here is the reg ex I used to find the string:
=520  \\\\\$a[1-9]

That worked. (And I got really impressed with how clever the reg ex can be.)

Here is the rather simple-minded reg ex I thought I might be able to use to replace the piece I wanted to replace and keep the numeral at the end of the string.

=300  \\\\\$a[1-9]

This did not work. (And, obviously, was a bit disappointed in my application of the quite clever little reg ex thing.)

As I said above, MARCedit simply input the reg ex as a string. 

Thanks.

Matthew Beacom

Metadata Librarian
Yale University Library
[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