MARCEDIT-L Archives

December 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:
Fri, 7 Dec 2012 20:13:51 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (149 lines)
yep, if there are only spaces between the 2 bracketed phrases, then I
think this should work:

Find:  (=952.*\$o[^\[]*)(\[[^\[\]]*\]\s*)(.*)
Replace:  $1$3

I've just added \s* within the 2nd parenthetical expression of the
Find RegEx, which means the Replace should also remove any number of
spaces found directly following the 1st bracketed phrase in the field.

I'm not able to test it right now, so let me know if that works...
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 Fri, Dec 7, 2012 at 6:58 PM, Nick Berezovsky <[log in to unmask]> wrote:
> Hi, Heidi
>
> The expression you wrote took care of my problem!! Thank you so much!
>
> There is one little thing...  Running the expression leaves an extra space
> between J-P and square brackets.
>
> For example: J-P  [FAMILY]......should be J-P [FAMILY].........
>
> Is it possible to take this space out modifying your reg. expression?
>
> Thanks!
>
> Regards,
>
> Nick
>
>
> On Fri, Dec 7, 2012 at 3:54 PM, Heidi P Frank <[log in to unmask]> wrote:
>>
>> Hi Nick,
>> I think you could to this using the Find/Replace function, with
>> something like this:
>>
>> Find:  (=952.*\$o[^\[]*)(\[[^\[\]]*\])(.*)
>> Replace:  $1$3
>>
>> Not sure how familiar you are with the RegExes, so here's a breakdown
>> of the Find RegEx:
>> (=952.*\$o          Look for 952 fields that have a subfield o
>> [^\[]*)                 Followed by any number of characters that is
>> NOT an opening square bracket
>> (\[                     Followed by an opening square bracket
>> [^\[\]]*               Followed by any number of characters that are
>> NOT either an opening or closing square bracket
>> \])                     Followed by a closing square bracket
>> (.*)                    Followed by any number of characters
>>
>> The 3rd through 5th lines above capture the first square-bracketed
>> content, and is eliminated in the Replace because it is the "$2"
>> parenthetical section of the Find RegEx.  (hope that makes sense)
>>
>> and there may be a simplified version but this seemed to work for me.
>> cheers,
>> 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 Fri, Dec 7, 2012 at 2:02 PM, Nick Berezovsky <[log in to unmask]>
>> wrote:
>> > Hi,
>> >
>> > I need help writing an expression for removing a string of text from the
>> > call numbers in a large set of MARC record (field 952, subfield $o).
>> >
>> > If there are two adjacent strings of text in square brackets, like [xxx]
>> > [yyy], the first one should be deleted. The corrected version should be
>> > [yyy]
>> >
>> > The text in square brackets varies.
>> >
>> > Example: $oJ-P [FAMILY] [EMOTIONS] DUVALL, JOHN. The corrected version
>> > should look like: $oJ-P [EMOTIONS] DUVALL, JOHN.
>> >
>> > Thank you for any help!
>> >
>> > --
>> > Nick Berezovsky
>> >
>> > Head of Acquisitions and Cataloging
>> > Salina Public Library,
>> > 301 W. Elm St.
>> > Salina, KS 67401
>> >
>> > [log in to unmask]
>> > 785-825-4624
>> > ________________________________________________________________________
>> >
>> > 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]
>
>
>
>
> --
> Nick Berezovsky
>
> Head of Acquisitions and Cataloging
> Salina Public Library,
> 301 W. Elm St.
> Salina, KS 67401
>
> [log in to unmask]
> 785-825-4624

________________________________________________________________________

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