[Koha] regex to put space between the classification number and author letters

David Liddle david at liddles.net
Thu Jul 6 20:43:45 NZST 2023


Lauren, I don't know if you got a direct personal answer to this, but
having tried my hand at the question at https://regex101.com/, the
following regular expression matches your samples:

(.?[0-9]{3})([A-Z]{2})

and the following inserts a space in the correct position:

$1 $2


On Thu, Jun 29, 2023 at 11:08 PM Lauren Denny <lauren_denny at sil.org> wrote:
>
> Hi everyone,
>
> I have about 5000 records with no space between the classification number
> and author letters.  Here are a few examples:
> 491.431SA
> 431PA
> 260RE
>
> I would like to add a space so that they become:
> 491.431 SA
> 431 PA
> 260 RE
>
> Is there a way to add the space in the call number using the Koha item
> batch modification?  I feel like I could use regex to add a space after the
> numbers or before the letters but don't know enough about regex to know how.
>
> Could someone help? Or offer another way to edit them?
>
> Thanks,
> Lauren
> _______________________________________________
>
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


More information about the Koha mailing list