[Koha-bugs] [Bug 23873] New: Allow marc modification templates to use capturing groups in substitutions

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Oct 22 14:51:55 CEST 2019


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

            Bug ID: 23873
           Summary: Allow marc modification templates to use capturing
                    groups in substitutions
 Change sponsored?: ---
           Product: Koha
           Version: 19.05
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P5 - low
         Component: Tools
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: andrew at bywatersolutions.com
        QA Contact: testopia at bugs.koha-community.org

To test:
- Find/create a bib record with a date formatted as YYYYMMDD
- Create a marc modification template to Copy and Replace your field with this
regex:
 s/(\d{4})(\d{2})(\d{2})/\1\-\2\-\3/ -- this should reformat your date as
"YYYY-MM-DD"
- Apply your template to your bib
- Observe that the match worked, but the substitution failed -- the value
"\1\-\2\-\3" is treated literally

Apparently this fails due to some aspect of how regex works within perl? It'd
be hugely useful if we could get it working.

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


More information about the Koha-bugs mailing list