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]
|