mirror of
https://github.com/yuzu-emu/mbedtls
synced 2024-11-24 09:38:26 +00:00
Improve regexes in rename.pl
This commit is contained in:
parent
f2c8711088
commit
c559f0476d
1 changed files with 3 additions and 3 deletions
|
@ -38,10 +38,10 @@ for my $name (@names) {
|
|||
$subst{$old} = $new;
|
||||
}
|
||||
|
||||
my $string = qr/".*?(?<!\\)"/;
|
||||
my $string = qr/"(?:\\.|[^\\"])*"/;
|
||||
my $space = qr/\s+/;
|
||||
my $idnum = qr/[a-zA-Z0-9_]+/;
|
||||
my $symbols = qr/[!#%&'()*+,-.:;<=>?@^_`{|}~\$\/\[\\\]]+|"/;
|
||||
my $symbols = qr/[-!#$%&'()*+,.\/:;<=>?@[\\\]^_`{|}~]+|"/;
|
||||
|
||||
# if we replace inside strings, we don't consider them a token
|
||||
my $token = $do_strings ? qr/$space|$idnum|$symbols/
|
||||
|
@ -86,7 +86,7 @@ while( my $filename = shift )
|
|||
}
|
||||
|
||||
if( %warnings ) {
|
||||
print "\nWarning: lines skipped due to unexpected charaacters:\n";
|
||||
print "\nWarning: lines skipped due to unexpected characters:\n";
|
||||
for my $filename (sort keys %warnings) {
|
||||
print "in $filename:\n";
|
||||
print for @{ $warnings{$filename} };
|
||||
|
|
Loading…
Reference in a new issue