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>
Ævar Arnfjörð Bjarmason committed
Sep 30, 2010 at 13:43 UTC
49f73852c80ee681c179ee2eb76b1a792d7b1b22
1 file changed
+2
-2
git-send-email.perl
+2
-2
@@ -852,8 +852,8 @@ sub quote_rfc2047 {
852
853
sub is_rfc2047_quoted {
854
my $s = shift;
855
- my $token = '[^][()<>@,;:"\/?.= \000-\037\177-\377]+';
856
- my $encoded_text = '[!->@-~]+';
855
+ my $token = qr/[^][()<>@,;:"\/?.= \000-\037\177-\377]+/;
856
+ my $encoded_text = qr/[!->@-~]+/;
857
length($s) <= 75 &&
858
$s =~ m/^(?:"[[:ascii:]]*"|=\?$token\?$token\?$encoded_text\?=)$/o;
859
}