send-email: is_rfc2047_quoted use qr// regexes

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Ævar Arnfjörð Bjarmason 2010-09-30 13:43:05 +00:00 committed by Junio C Hamano
parent 41ae8f1d6c
commit 49f73852c8
1 changed files with 2 additions and 2 deletions

View File

@ -852,8 +852,8 @@ sub quote_rfc2047 {


sub is_rfc2047_quoted { sub is_rfc2047_quoted {
my $s = shift; my $s = shift;
my $token = '[^][()<>@,;:"\/?.= \000-\037\177-\377]+'; my $token = qr/[^][()<>@,;:"\/?.= \000-\037\177-\377]+/;
my $encoded_text = '[!->@-~]+'; my $encoded_text = qr/[!->@-~]+/;
length($s) <= 75 && length($s) <= 75 &&
$s =~ m/^(?:"[[:ascii:]]*"|=\?$token\?$token\?$encoded_text\?=)$/o; $s =~ m/^(?:"[[:ascii:]]*"|=\?$token\?$token\?$encoded_text\?=)$/o;
} }