[Koha-bugs] [Bug 29781] Allow item batch modification to use capturing groups in regex option

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jan 18 14:58:14 CET 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29781

--- Comment #5 from Andrew Fuerste-Henry <andrew at bywatersolutions.com> ---
A quick hypothetical example using this to find call numbers that don't have
volume and copy numbers in the correct order.

To test:
1: have 2 items with these call numbers:
 - KF 123 .A987 c. 11 v. 22
 - KF 123 .A987 v. 3 c. 1
2: put those items in item batch mod
3: do a regex substitution on call number:
 - s/(^[A-Z]+ \d+\b)\s+(\.[A-Z]+\d+\b)\s+(c\.\s\d+\b)\s+(v\.\s\d+\b)/$1 $2 $4
$3/
4: Observe your call numbers are now:
 - KF 123 .A987 v. 22 c.11
 - KF 123 .A987 v. 3 c. 1

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list