This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regexec.c: Change \b{sb} rule in prep for Unicode 8.0
authorKarl Williamson <khw@cpan.org>
Wed, 17 Jun 2015 22:25:48 +0000 (16:25 -0600)
committerKarl Williamson <khw@cpan.org>
Wed, 17 Jun 2015 23:36:36 +0000 (17:36 -0600)
Unicode 8 version modifies this rule.

regexec.c

index 893ce3b..31fdcb2 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -4348,10 +4348,11 @@ S_isSB(pTHX_ SB_enum before,
         return FALSE;
     }
 
-    /* SB7.  Upper ATerm  ×  Upper */
+    /* SB7.  (Upper | Lower) ATerm  ×  Upper */
     if (before == SB_ATerm && after == SB_Upper) {
         temp_pos = lpos;
-        if (SB_Upper == backup_one_SB(strbeg, &temp_pos, utf8_target)) {
+        backup = backup_one_SB(strbeg, &temp_pos, utf8_target);
+        if (backup == SB_Upper || backup == SB_Lower) {
             return FALSE;
         }
     }