https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41932
--- Comment #43 from Marcel de Rooy <[email protected]> --- And have added a new slightly modified syntax to POD of _zero_pad_callnumber: + The following syntax is used for this preference: + pref: format|pref;;format + format: filter,pairs + pairs: digits,padlen|digits,padlen,pairs + filter: ""|"^string"|"string$"|"string" + + So the pref contains a number of formats. Each format has a + double quoted filter, followed by a list of pairs (two numbers). + Each pair contains a minimum number of digits to be found and + a pad length. + + For security reasons the filter is not a full regex. But the filter + supports 'starts with', 'ends with' and 'contains'. The string may + contain a-z, 0-9, whitespace and a few special characters. See the + constant ALLOWED_FILTER_CHARS. + + When a format leads to a match, the remaining formats are skipped. + This means that the order of formats in the preference is important. + + Whitespace can be used for readability between formats, filters or + pairs (as in following example). + + Suppose that pref (with one format) is set to: "^T ", 2,5, 4,6 + This reads as: The call number should start with T and a space and + should contain at least two digit groups (a group of 2 or more, and + a group of 4 or more). The first group is padded to length 5, the + second group to 6. + + More examples can be found in t/ClassSortRoutine_Generic.t. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
