Bug 26126

Summary: RegEx Rule for Call Number Splitting doesn't work
Product: Koha Reporter: Christian Stelzenmüller <christian.stelzenmueller>
Component: ToolsAssignee: Bugs List <koha-bugs>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

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