MARCEDIT-L Archives

September 2015

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:
Fri, 25 Sep 2015 10:39:05 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (51 lines)
The reason the expression is capturing the second set of data (that you don't want) is the (.*) after the $a.  This is making your expression too greedy.  You're expression would likely work better as:
(=100.{4})(\$a)([A-z]*[^ ])( )([A-z]*)$

The expression here breaks down as:
Group 1: field 100 + indicators (any)
Group 2: Subfield A
Group 3: match text a-Z (case insensitive) till you get to a space)
Group 4: the space
Group 5: remainder of the text

Assuming that your 100 may include other values (not just characters) -- you may consider doing word  character matches, which would then look like this:
(=100.{4})(\$a)( \w+)(\s)(\w+)$

Which breaks down to:
Group 1: field 100 + indicators (any)
Group 2: Subfield A
Group 3: match word character
Group 4: the space
Group 5: word character

--tr


-----Original Message-----
From: MarcEdit support in technical and instructional matters [mailto:[log in to unmask]] On Behalf Of Eugene Espinoza
Sent: Friday, September 25, 2015 10:25 AM
To: [log in to unmask]
Subject: [MARCEDIT-L] regex alphabetic characters of Last Name First Name

Hi! It seems I can not regex the following:
=100  \\$aAlegre Mauricio

with the following:

(=100.{4})(\$a)(.*[a-zA-Z])( )(.*[a-zA-Z])$

I validated first to make sure it only capture the data I need to regex, however the regex also captures below:
=100  \\$aVentura Sylvia Mendez

which is not what I wanted to. I wanted to put a comma (,) between the Last Name and First Name in this regex, however, since the regex did not work, I can not proceed. Can somebody lead me to what I'm missing. And also is there a cheat sheet available to look at to for MARCEdit's regex?

Thanks in advance and have a nice day!

________________________________________________________________________

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