Bug 26126 - RegEx Rule for Call Number Splitting doesn't work
Summary: RegEx Rule for Call Number Splitting doesn't work
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-03 08:28 UTC by Christian Stelzenmüller
Modified: 2021-06-14 21:28 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Stelzenmüller 2020-08-03 08:28:43 UTC
Splitting Call Numbers with the following RegEx - Rule and Call Number does not work with following RegEx Rule:

s/(\s)([A-Z])/\n\n$2/g

Call Number: 658.4 Lan

A space after a capital letter will be replaced with two breaks.

The testing option in the Classification splitting rules works fine.
The Call Number becomes 

658.
4

Lan


Exporting an item / call number in the batch with label creator module, and a classification source that has RegEx as a Splitting Rule, one break will be deleted in the exported pdf.
It seems it doesn't matter if the used Classification is DDC or generic / z.
Comment 1 Christian Stelzenmüller 2020-08-03 11:31:56 UTC
A working solution was found:

putting a blank after the \n 

Sorry