Subject: | |
From: | |
Reply To: | |
Date: | Tue, 22 Sep 2015 21:51:53 +0000 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
On Tuesday, September 22, 2015 2:13 PM, Timothy Delaney wrote:
> An example of some 949's:
>
> =949 \\$aFIC ABC$i3100312312312$p30.00
> =949 \\$aSC CBS$i3100245645645$p10.00
> =949 \\$aB NBC$i3100178978978$p29.99
> =949 \\$a792.586958483 CNN$i3100499999999$p15.75
>
> I'd like to add a subfield "h" based on the first 1-3 characters in subfield "a" :
>
> =949 \\$aFIC ABC$i3100312312312$p30.00$hHSFIC
> =949 \\$aSC CBS$i3100245645645$p10.00$hHSFIC
> =949 \\$aB NBC$i3100178978978$p29.99$hHSBIO
> =949 \\$a792.586958483 CNN$i3100499999999$p15.75$hHSNONFIC
Simple Find and replace, repeated for each case (could be entered into a task list, so you could do all with a single command):
Find: (=949.{5}a)(FIC)(.+)
Replace: $1$2$3$hHSFIC
Find: (=949.{5}a)(SC)(.+)
Replace: $1$2$3$hHSFIC
Find: (=949.{5}a)(B)(.+)
Replace: $1$2$3$hHSBIO
Find: (=949.{5}a)(\d)(.+)
Replace: $1$2$3$hHSNONFIC
################
The above should work for your test cases.
Explanation:
=949.{5}a, finds "=949 \\$a" and captures it as $1
The next piece finds FIC, SC, B, or a digit, and captures it as $2
The final piece finds anything following the above and captures it as $3.
Then the Replace puts $1, $2, $3 together, and adds your desired $h at the end.
I hope this helps,
Bryan Baldus
Senior Cataloger
Quality Books Inc.
The Best of America's Independent Presses
1-800-323-4241x402
[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]
|
|
|