lib/Unicode/UCD.t: Anchor a couple of regexes
authorKarl Williamson <public@khwilliamson.com>
Fri, 8 Nov 2013 16:21:11 +0000 (09:21 -0700)
committerKarl Williamson <public@khwilliamson.com>
Tue, 31 Dec 2013 15:27:18 +0000 (08:27 -0700)
A future commit will need these to be anchored to avoid false positives.

lib/Unicode/UCD.t

index a646358..a741367 100644 (file)
@@ -1566,7 +1566,8 @@ foreach my $prop (sort keys %props) {
                 }
             }
         }
-        elsif ($full_name =~ /Simple_(Case_Folding|(Lower|Title|Upper)case_Mapping)/)
+        elsif ($full_name
+            =~ / ^ Simple_(Case_Folding|(Lower|Title|Upper)case_Mapping) $ /x)
         {
 
             # These properties have everything in the regular array, and the
@@ -1688,7 +1689,10 @@ foreach my $prop (sort keys %props) {
                 }
             } # Otherwise, the map is to a simple scalar
             elsif ($full_name =~    # These maps are in hex
-                    /(Simple_)?(Case_Folding|(Lower|Title|Upper)case_Mapping)/)
+                    / ^ ( Simple_ )? ( Case_Folding
+                                       | ( Lower
+                                           | Title
+                                           | Upper ) case_Mapping ) $ /x)
             {
                 $invmap_ref->[$i] = sprintf("%X", $invmap_ref->[$i]);
             }