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

Jonathan Druart <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jonathan.druart+koha@gmail.
                   |                            |com

--- Comment #91 from Jonathan Druart <[email protected]> ---
+        $term =~ s/(?<!\\)((?:[\\]{2})*)(\{|\[)([^\s\[\]\{\}]+ TO
[^\s\[\]\{\}]+(?<!\\)(?:[\\]{2})*)(\}|\])/$1.'~~L'.($2 eq '[' ?
'S':'C').'~~'.$3.'~~R'.($4 eq ']' ? 'S':'C').'~~'/ge;



+            $term =~ s@(
+                (?<!\\)(?:[\\]{2})*/
+                (?:[^/]+|(?<=\\)(?:[\\]{2})*/)+
+                (?<!\\)(?:[\\]{2})*/
+            )$lookahead@"~~XI$rgx_i~~"@ex


I can push this kind of stuffs if everybody agrees, but I must warn that we are
opening a sensible door. If we find regressions that will be a mess to
maintain, or even to enhance.

Questions and suggestions:
1. Could we use named capture in the regexs?
2. What means XI?
3. Why do we need the 'e' modifier in the second one?
4. Can we split on several lines the regexs to make them more readable? (/xms)

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to