Re: [Koha] MARC modification templates problem

2023-08-09 Thread Eric Phetteplace
Hi Caroline, That works! Thank you so much. Removing the if condition and using a more specific regex substitution changed only the field I wanted and left the other alone. Oddly, if I say I want to do this to the "1st" field it still shows the problematic behavior (both fields are modified, the s

Re: [Koha] MARC modification templates problem

2023-08-09 Thread Caroline Cyr La Rose
Hi Eric, Did you try without the if? The regex replace should only replace the example.com links and leave the other ones alone. I tried in 23.05.02 with Copy and replace All field(s) 856 u to 856 u RegEx s/^https?:\/\/example.com/https://proxy.cca.edu/url?=https://example.com/ the record

Re: [Koha] MARC modification templates problem

2023-08-08 Thread Eric Phetteplace
Hi Caroline, Yes, they do happen to have different domains, one I want to preserve and one I want to proxy. Thank you for the suggestion! Using a more qualified regex seemed like it should work, but Koha still clobbers the second 856$u subfield. Here's a modified example: Record 245 _ _ ‡aExample

Re: [Koha] MARC modification templates problem

2023-08-07 Thread Caroline Cyr La Rose
Hi Eric, This has been my experience as well. I haven't found a way to modify only one field when there are more that one of the same tag in the same record. Are the links you are trying to change all the same domain? Or a couple of different domains? If so, you could match the regex on a lo

[Koha] MARC modification templates problem

2023-08-04 Thread Eric Phetteplace
Hi collective wisdom, I'm running into a MARC modification template problem and I can't tell if I'm missing something or there's a bug/limitation. I know I could accomplish these edits with MARCEdit or a script, but I was hoping to use Koha's tools. I have a record with two 856 fields with links,