MARCEDIT-L Archives

June 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:
Geoffrey Skinner <[log in to unmask]>
Reply To:
MarcEdit support in technical and instructional matters <[log in to unmask]>
Date:
Mon, 20 Jun 2016 16:10:27 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (50 lines)
Thanks, Terry. That's very helpful.

-----Original Message-----
From: MarcEdit support in technical and instructional matters [mailto:[log in to unmask]] On Behalf Of Terry Reese
Sent: Friday, June 17, 2016 9:59 PM
To: [log in to unmask]
Subject: Re: [MARCEDIT-L] RegEx replacement of a pattern followed by a digit

In marcedit (and the .net language) you name the group if you have an instance where you'd have something like what you are describing.  

For example -- say I have:

=245  10

And I want to change the second indicator to a 1, I need to name the capture group:
(?<one>=245.{3})(.*)
${one}1

The syntax is detailed in the regular expression language reference: https://msdn.microsoft.com/en-us/library/az24scfc(v=vs.110).aspx


--tr

-----Original Message-----
From: MarcEdit support in technical and instructional matters [mailto:[log in to unmask]] On Behalf Of Geoffrey Skinner
Sent: Friday, June 17, 2016 7:00 PM
To: [log in to unmask]
Subject: [MARCEDIT-L] RegEx replacement of a pattern followed by a digit

There may already be a discussion of this that I've overlooked, but if not:
I have been using RegEx in various contexts for many years, but am stumped by trying to replace a pattern followed by a digit in MarcEdit. For example (a made up one), say I want to find all the instances of 246 tags with a second indicator of [blank] and change the second indicator to 3, so I could look for (\=246  .)\ and in NoteTab, my replace with statement would be $1\3. The result would be =246  13 or =246 33, but in MarcEdit, I would get =246  1\3 or =246  3\3; not escaping the 3 gives me a literal: $13. I don't see a solution in the MarcEdit help, but perhaps someone here could share it. Thanks!

Geoffrey
--------------------------------------------------------------------------
Geoffrey Skinner, Cataloging and Metadata Librarian Sonoma County Library
211 E Street, Santa Rosa, CA
[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