MARCEDIT-L Archives

August 2012

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:
Heidi P Frank <[log in to unmask]>
Reply To:
MarcEdit support in technical and instructional matters <[log in to unmask]>
Date:
Tue, 28 Aug 2012 15:08:16 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (90 lines)
Hi Kristi,
If I get what you want to do correctly, I think you could do a
"Find/Replace" using this regex:
Find:
(oxfordscholarship\.com\.olinkserver\.franklin\.edu.*)(\d{13})(.*)
Replace with:
$1$2$3/acprof-$2

and make sure "Use Regular Expression" is checked.

The Find command is looking for any string matching:
the first part of the URL up to "edu" - you have to escape out the
periods using the backslashes (you can shorten this as long as it's
unique)
then followed by any number of characters (.*)
then followed by 13 digits (\d{13})
then followed by any number of characters (.*)

In the Replace field, you can reference the content of the string that
is placed in each set of parentheses, so:
the $1 references the first section in parentheses of the Find
command, so it copies everything up to the 13 digits
the $2 references the second section in parentheses of the Find
command, so it copies the 13 digits (i.e., the ISBN)
the $3 references the third section in parentheses of the Find
command, so it copies the remaining characters after the 13 digits
Then you add the text "/acprof-" followed by the 13 digits, which is
again using the $2 to reference the second section in parentheses of
the Find command.

I'm sure there are better experts on here who could simplify this :)
But I tried this regex on a single record using your URL example, and
it worked - so hopefully it makes sense and you could modify/simplify
it as needed.

Best,
Heidi

Heidi Frank
Electronic Resources & Special Formats Cataloger
New York University Libraries
Knowledge Access & Resources Management Services
20 Cooper Square, 3rd Floor
New York, NY  10003
212-998-2499 (office)
212-995-4366 (fax)
[log in to unmask]
Skype: hfrank71


On Tue, Aug 28, 2012 at 1:59 PM, Kristi Lobrano
<[log in to unmask]> wrote:
> Dear MARCEdit gurus,
>
> I am working on editing a file of oxfordscholarship Ebooks. I need to append only a part of the URL.
>
> This is how the URL is currently
> http://0-www.oxfordscholarship.com.olinkserver.franklin.edu/view/10.1093/acprof:oso/9780195141375.001.0001
>
> I need it to be
> http://0-www.oxfordscholarship.com.olinkserver.franklin.edu/view/10.1093/acprof:oso/9780195141375.001.0001/acprof-9780195141375
>
> In the edit subfield data tool, I can easily use the ^e then "acprof-" in the replace field to append the "acprof-".
>
> However, I am having difficulty append just the 13 digit ISBN, without the 001.001.
>
> I believe this can be done with regular expressions.  I am only vaguely familiar with regular expressions.
>
> Any help will be greatly appreciated!
>
> Thanks
> Kristi Lobrano
>
>
> --
> Kristi Lobrano, MLIS
> Systems Librarian
> Franklin University
> 303 S. Grant Ave
> Columbus, OH 43215
> (614) 947-6223
>
> ________________________________________________________________________
>
> 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