A potential problem I've encountered with expressions like:
Find: (=245.*)(\.)(\$c.*)
...is the possibility that there very likely could be a "=245" inside an 856 field,
and the replacement command could wind up editing, say, an ebook's URL.
I realize the caret negates, but there must be some way to use the caret as the
necessary start-of-string character here (I left my regex book at work).
----------------------------
Seth McQuale, MSLIS
Systems Librarian
New York Institute of Technology
Wisser Memorial Library, Room 112
Old Westbury, NY 11568-8000
[log in to unmask]
(516) 686-1164 [fax (516) 686-1320]
----------------------------
On 5/14/2020 9:19 AM, Terry Reese wrote:
> >> Find ^245.*(\.)‡c.*$
>
> This expression won’t work because you are missing the “=” sign that starts fields.
> The ^ is going to invalidate the expression. I also would do it differently.
>
> Find: (=245.*)(\.)(\$c.*)
>
> Replace: $1 /$3
>
> For the second one – you just need to use a limiter
>
> (=008.{2})(.{23})(.)(.*)
>
> If you are looking for something specific in position 23, you’d change (.).
> Remember, positions in marc start at zero, regular expressions they start at 1.
>
> $1$2[replace character here]$4
>
> --t
>
> *From:* MarcEdit support in technical and instructional matters
> <[log in to unmask]> *On Behalf Of *Laura Morrison
> *Sent:* Thursday, May 14, 2020 8:55 AM
> *To:* [log in to unmask]
> *Subject:* [MARCEDIT-L] regular expression help needed
>
> Hello all,
>
> I am attempting to edit some bib records in MarcEdit and need help with two different
> regular expressions. The first one is editing the 245 field, and, the second one is
> editing the 008 field.
>
> First regular expression help needed with:
>
> My library gets our Overdrive records from the Overdrive Marketplace. All of these
> records have a period instead of a slash in front of the subfield c in the 245 field.
> I am trying to find a regular expression that will ignore everything up to that
> period, then replace that period with a space and a slash.
>
> For example,
>
> 245 10 Gone with the wind$h[electronic resource].$cMargaret Mitchell. changes to 245
> 10 Gone with the wind$h[electronic resource] /$cMargaret Mitchell.
>
> I plan to use Find and Replace unless someone else has a better idea. What I have
> come up with so far is
>
> Find ^245.*(\.)‡c.*$
>
> Replace / (with a space in front of the slash)
>
> Second regular expression help needed with:
>
> Same records from the same place. All of the 008 fields are coded for electronic
> resource, but our library needs them to be coded for online in order for the display
> icons to work correctly. I know the position that I want to change is the 23
> position in both book records and sound recording records. It seems like there should
> be a very simple solution for this but my brain is not able to come up with it at
> this time. Any help would be greatly appreciated.
>
> Thanks in advance. Hope all are well and safe.
>
> Laura S. Morrison
>
> Catalog Librarian
>
> Spartanburg County Public Libraries
>
> 151 S. Church St.
>
> Spartanburg, SC 29306
>
> 864-596-3500 ext 1281
>
> Fax 864-596-3518
>
> email: [log in to unmask] <mailto:[log in to unmask]>
>
> URL: http://secure-web.cisco.com/1p057iJ5M1ZkZCCimwXwiF7rdsguNnnHve8rGdHzNkeQ_0O1ufxMvloAf1WkOiD9gtwAjCYnBdjfKGZiSzlMIvxujriT4aK8UKd2-LWudOLfNAzgvnw8ZxgKqct2wgNBUJbijI6MpencD7yugeYZSoeaPNw2PscRI_3gEX9QVhuycPm6vbfdsNZ6__ySDqvd0-txdxvvXPuamBst3hpJfA5VHs5BYHhkUh1oLXbaDB8IR4usEf4iBBP-srkqTy3D1lQ85CErESAcPi3yvwgQAgeuVNcW_vJLwENmgogt0knMOGTTSG1ZfG0gkDj7vJQv6wM1SJZZcD-6CEATA2hY9aZTSjim2_Oci2WpoAx5o4DLLdZOvTZ3Bss4SQ8p-pRTaJYzcUMYg20SKG4rK7DD9--pFocl6XaSf1rekrYxI12qz6hOz20P2dhQZnIwF0ZLF3t3JLPOWVi1bg44Ck_RfbQ/http%3A%2F%2Fwww.infodepot.org
> <http://secure-web.cisco.com/1P7yr22FQSS5WS0JR9qBpgXfPhTfspMGrln5TYDVp-quON-SWdMWDoGRBitondD_7UbF5MYkFOW1zHjf2tWC0SIk54fLVHE_Dj9CNIZ5pngWPeVPW1q0iQPRtP1xZGQPBLJPFjnjWNAXxQVhsVw-OEeY6ULOhi5mBXlwuN8-BgBEVMbz2Ey_BAAwBCTfZilNMpy9eXCWQSNhoBtlUV75UQnh6W9cMDeACuCOIomBezJpxNSit9FFg9jkENku1WqYJ6oV26xaBJ-b-ablyiEj7LzsU5mUljHtp1xsiH5XUvCBU9pn6vbmWN2PH1kc4Ezw9QYgxy9FUe1xY-NufA4SWBHxWBBBuX7_dMoIR4vdqn8ecMVt3PATTrwWX9G5N_DqJkbTuaEBVSFc4R7x9pc1zPmt2a5AlfFMdK0bihXnzDqB561dcs02krfkPBlBX4HbkYUW1gwKwC3NCMZBeDCq6fw/http%3A%2F%2Fwww.infodepot.org%2F>
>
>
> /"If you can't find it, you don't own it."/
>
> /"The Librarian, whose job is to heal ignorance, to keep life safe for poetry and to
> put knowledge smack dab in the middle of the American way."--From The Philadelphia
> Inquirer, editorial page, /
>
> /(9-20-03)/
>
> //
>
> /"Any opinions expressed are those of the individual and may not reflect the opinions
> or policies of the Spartanburg County Public Libraries."/
>
> //
>
> /P//Please consider the environment before printing this email./
>
> ________________________________________________________________________ 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] <mailto:[log in to unmask]>.
> To unsubscribe, send a message "SIGNOFF MARCEDIT-L" to [log in to unmask]
> <mailto:[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]
________________________________________________________________________
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]
|