MARCEDIT-L Archives

December 2009

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:
Michael J Dulock <[log in to unmask]>
Reply To:
MarcEdit support in technical and instructional matters <[log in to unmask]>
Date:
Wed, 2 Dec 2009 13:16:56 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (187 lines)
The second match worked, thanks Kathy! I noticed the first one you gave was
working from the end, but I got to "0 changes made" too quickly. I'm sure
that was my mistake. The second time through with your syntax below it
worked though. (Took 15 passes...) Thank you!!

Thanks to all who chimed in. One day, in my spare time, I'll learn regular
expressions properly...

Thanks again,

Michael


-----Original Message-----
From: MarcEdit support in technical and instructional matters
[mailto:[log in to unmask]] On Behalf Of Kathryn Lybarger
Sent: Wednesday, December 02, 2009 12:35 PM
To: [log in to unmask]
Subject: Re: [MARCEDIT-L] removing extra subfields in 520

Michael,

The replace side of my suggestion should look like:    $1;

(dollar, one, semicolon with no quotes around it)

Are you sure that the contents are not changing?  It may be hard to see, 
since it should start its replacing with the LAST $a on each line.  The 
parentheses (which enclose what will eventually become $1) should 
capture everything from the beginning of the 520 line up to right before 
the last $a.  You may have to hit Replace All a few times so that it can 
creep up to the front.  If you do that, does the number of replacements 
it makes change?

If that does not work, you might try using the regular expression in the 
Find tab (as opposed to the Replace tab) just to see what sorts of 
things it is matching.  It should match from the beginning of the 520 
line through (and including) the last $a.

Here's a slightly different one to match with:

(^=520  .....*?)\$a

That should be slightly safer (it is anchored, so will only match =520 
that appear at the beginning of the line) and should start with the $a 
nearest to the front (still skipping the very first one).

Hope this helps,
Kathryn

Michael J Dulock wrote:
> Thanks for the help, Kathryn & Joel. I'm still having trouble with the
> syntax. ME says "X replacements made" but the contents of the 520 are
> unchanged. What should the "replace" side of the expression look like?
I've
> tried a couple variations that include "$1;" and neither seems to do the
> job...
>
> Thanks again,
>
> Michael
>
>
> -----Original Message-----
> From: MarcEdit support in technical and instructional matters
> [mailto:[log in to unmask]] On Behalf Of Joel Marchesoni
> Sent: Wednesday, December 02, 2009 6:32 AM
> To: [log in to unmask]
> Subject: Re: removing extra subfields in 520
>
> Hi Michael,
>
> I would go with your own suggestion of replacing all of the '$a's with a
> semicolon then replace the beginning ('=520  0\;') with '=520  0\$a'.  I
> think that should work just fine.
>
> Joel
>
> Michael,
>
> If you replace "(=520  .....*)\$a" with "$1;", that should replace one of
> the extraneous $a's with a semi-colon.  If you just keep hitting the
Replace
> All button until it says "0 modifications made", you should get all of
them.
>
> Kathryn
>
> -----Original Message-----
> From: MarcEdit support in technical and instructional matters
> [mailto:[log in to unmask]] On Behalf Of Michael J Dulock
> Sent: Tuesday, December 01, 2009 5:45 PM
> To: [log in to unmask]
> Subject: removing extra subfields in 520
>
> Hi folks,
>
> I've been playing with this for some time and am having no luck. It
doesn't
> help that what little I can do with regular expressions I learned by
> backwards engineering those supplied by others...
>
> Anyway, I'm going to be loading a large number of records from one source
> into our catalog, some of which contain a 653 field with multiple keywords
> in it. Our policy is to change 653s into 520 1st indicator 0 for subject
> strings, which I've done without incident. The problem is that each term
is
> preceded by a $a, as in:
>
> =520  0\$aAerosols$aComputer Calculations$aDiffuse Solar Radiation$aDirect
> Solar Radiation
>
> I'd like to replace all but the first $a with a semicolon or comma, but I
> can't figure out how to get a regular expression to do it (if one can). It
> would also work to replace all the $a, then I could put the initial
required
> one back in by replacing "=520  0\;" with "=520  0\$a".
>
> I realize this may be too variable a characteristic for a regular
expression
> to fix, but I thought I'd try the collective wisdom before I go through
and
> manually fix them.
>
> Any ideas?
>
> Thanks much in advance,
>
> Michael
>
>
> ____________________________________________
> Michael Dulock
> Assistant Professor
> Metadata Librarian
>
> University of Colorado at Boulder Libraries Cataloging & Metadata Services
> Department
> 184 UCB, 1720 Pleasant Street
> Boulder, Colorado 80309-0184
>  
> Phone: 303-492-5518
> Fax: 303-492-0494
> E-mail: [log in to unmask]
>
http://ucblibraries.colorado.edu/___________________________________________
> _ 
>
> ________________________________________________________________________
>
> 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]
>
> ________________________________________________________________________
>
> 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]

________________________________________________________________________

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