regen/regcharclass.pl: Simplify regex
authorKarl Williamson <public@khwilliamson.com>
Wed, 3 Oct 2012 03:45:45 +0000 (21:45 -0600)
committerKarl Williamson <public@khwilliamson.com>
Tue, 9 Oct 2012 17:16:04 +0000 (11:16 -0600)
There doesn't need to be a quantifier or capturing on this regex.

regen/regcharclass.pl

index 910953b..5d17c44 100755 (executable)
@@ -1040,7 +1040,7 @@ if ( !caller ) {
         s/^ \s* (?: \# .* ) ? $ //x;    # squeeze out comment and blanks
         next unless /\S/;
         chomp;
-        if ( /^([A-Z]+)/ ) {
+        if ( /^[A-Z]/ ) {
             $doit->();  # This starts a new definition; do the previous one
             ( $op, $title )= split /\s*:\s*/, $_, 2;
             @txt= ();