Skip to content

Commit

Permalink
Improve split regex
Browse files Browse the repository at this point in the history
  • Loading branch information
jadeallenx committed Jan 18, 2012
1 parent 95fbd9e commit 39f9762
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Authen/HTTP/Signature/Parser.pm
Expand Up @@ -141,7 +141,7 @@ sub parse {
# Positive lookbehind and positive lookahead in split
# http://www.effectiveperlprogramming.com/blog/1411

my ( $key_id, $algo, $hdrs, $ext ) = split /(?<="),(?=[ahe])/, $params;
my ( $key_id, $algo, $hdrs, $ext ) = split /(?<="),(?=[ahe].+=)/, $params;
$key_id =~ s/^keyId="(.*)"$/$1/;
$algo =~ s/^algorithm="(.*)"$/$1/;
Expand Down

0 comments on commit 39f9762

Please sign in to comment.