projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60910c9
)
regen/regcharclass.pl: Simplify regex
author
Karl Williamson
<public@khwilliamson.com>
Wed, 3 Oct 2012 03:45:45 +0000
(21:45 -0600)
committer
Karl 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
patch
|
blob
|
history
diff --git
a/regen/regcharclass.pl
b/regen/regcharclass.pl
index
910953b
..
5d17c44
100755
(executable)
--- a/
regen/regcharclass.pl
+++ b/
regen/regcharclass.pl
@@
-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= ();