send-email: is_rfc2047_quoted use qr// regexes
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 30 Sep 2010 13:43:05 +0000 (13:43 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Sep 2010 20:06:42 +0000 (13:06 -0700)
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-send-email.perl
index 036e4b4259babdda1e76a5aa558c3600b43a89c0..1890409232ce2407ed4cba16f1c65e87d1df19e9 100755 (executable)
@@ -852,8 +852,8 @@ sub quote_rfc2047 {
 
 sub is_rfc2047_quoted {
        my $s = shift;
-       my $token = '[^][()<>@,;:"\/?.= \000-\037\177-\377]+';
-       my $encoded_text = '[!->@-~]+';
+       my $token = qr/[^][()<>@,;:"\/?.= \000-\037\177-\377]+/;
+       my $encoded_text = qr/[!->@-~]+/;
        length($s) <= 75 &&
        $s =~ m/^(?:"[[:ascii:]]*"|=\?$token\?$token\?$encoded_text\?=)$/o;
 }