Permalink
Browse files

Improve split regex

  • Loading branch information...
mrallen1 committed Jan 18, 2012
1 parent 95fbd9e commit 39f97628ef4cba12f2a27921a79c49aaa24f996d
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Authen/HTTP/Signature/Parser.pm
@@ -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/;

0 comments on commit 39f9762

Please sign in to comment.