MARCEDIT-L Archives

August 2016

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:
Terry Reese <[log in to unmask]>
Reply To:
MarcEdit support in technical and instructional matters <[log in to unmask]>
Date:
Wed, 3 Aug 2016 17:32:38 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (126 lines)
Not in one step.  You can use the Extract tool to find everything with the first criteria -- extract that set -- then run the query based on the second criteria to get that isolated set of data.

--tr

-----Original Message-----
From: MarcEdit support in technical and instructional matters [mailto:[log in to unmask]] On Behalf Of Andy Boze
Sent: Wednesday, August 3, 2016 4:33 PM
To: [log in to unmask]
Subject: Re: [MARCEDIT-L] Searching record for multiple fields using regex

Ah, thanks, that explains it. I've been using Find, not Replace.

Is there a way, then, to search for records based on multiple fields? 
For example, say I wanted to find all the records where the 008 field contains the letter "o" in position 23 and also have a 776 field. Is there a way to do that?

On 8/3/2016 4:12 PM, Terry Reese wrote:
> And if you are looking for just the 008 -- you would never include the 
> end of line characters.  These are not seen as part of the expression.  
> You'd capture all data in a line by just using: =008.*  or =008.*$
>
> You only use the \r\n syntax when you are using the /m syntax, and again, only in the Replace All function.
>
> --tr
>
> -----Original Message-----
> From: MarcEdit support in technical and instructional matters 
> [mailto:[log in to unmask]] On Behalf Of Andy Boze
> Sent: Wednesday, August 3, 2016 3:36 PM
> To: [log in to unmask]
> Subject: Re: [MARCEDIT-L] Searching record for multiple fields using 
> regex
>
> As an example, here are the first few lines of a MARC record in my file.
>
> =LDR  01468cam a2200349Ia 4500
> =001  ocn675930325
> =003  OCoLC
> =005  20130211115710.0
> =006  m\\\\\o\\d\f\\\\\\
> =007  cr\bn|||||||||
> =008  101031s1849\\\\ht\\\\\\ol\\\f000\0\fre\d
> =035  \\$a(OCoLC)675930325
> =037  \\$a31-768$bLLMC
>
> I would expect
>
> =008.*\r?\n
>
> to match the entire 008 field, yet I get no match. I do get a match on
>
> =008.*\z
>
> On 8/3/2016 2:51 PM, Terry Reese wrote:
>> The /m does work in specific instances.  The \r\n sequence though 
>> isn't always true.  It's easier to look for \r?\n
>>
>> tr
>>
>> -----Original Message-----
>> From: MarcEdit support in technical and instructional matters 
>> [mailto:[log in to unmask]] On Behalf Of Andy Boze
>> Sent: Wednesday, August 3, 2016 1:59 PM
>> To: [log in to unmask]
>> Subject: [MARCEDIT-L] Searching record for multiple fields using 
>> regex
>>
>> I'm trying to find records that contain two fields. I've used the video at <https://www.youtube.com/watch?v=qNJA9p2_-qU> for guidance, but my search doesn't seem to work as expected.
>>
>> Let's say I want to find records containing a 008 field immediately followed by a 035 field. I would expect to get matches using the following regex.
>>
>> =008.*\r\n=035/m
>>
>> No match. Interestingly, when I try just
>>
>> =008.*\r\n
>>
>> I get no match. If I instead use
>>
>> =008.*\z
>>
>> I get a match for the entire 008 field. That's good. But if I try
>>
>> =008.*\z=035/m
>>
>> I get no match. In fact, if I try
>>
>> =008.*\z/m
>>
>> I get no match. So I'm wondering, is the /m no longer indicating a multi-field search? And does \r\n no longer indicate end of field, and \z must be used instead?
>>
>> I'll just mention that what I really want to do is search for a 008 field containing a character at a specific location, followed somewhere later by an 856 field containing a specific string. I'm sure I can figure that out if I can just get the example above with the 008 and 035 fields to work.
>>
>> Thanks for any assistance!
>>
>> --
>> Andy Boze, Associate Librarian
>> University of Notre Dame
>> 208 Hesburgh Library
>> (574) 631-8708
>>
>> _____________________________________________________________________
>> ___
>>
>> 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]
>>
>

--
Andy Boze, Associate Librarian
University of Notre Dame
208A Hesburgh Library
(574) 631-8708

________________________________________________________________________

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