From f1368d482150716f77cb7bf9e548cefaa8124586 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 13 May 2013 13:21:05 +0100 Subject: [PATCH] Make storing standard regexps a bit more sensible. --- Webperl/Block.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Webperl/Block.pm b/Webperl/Block.pm index fee3b39..1430e1a 100644 --- a/Webperl/Block.pm +++ b/Webperl/Block.pm @@ -65,6 +65,8 @@ sub new { my $invocant = shift; my $class = ref($invocant) || $invocant; my $self = $class -> SUPER::new("logtable" => "", + "formats" => {"url" => '^https?://[-\w]+(?:\.[-\w]+)+(?:/(?:[-\w]+/)*[-.\w]*(?:\?(?:[-\w~!\$+|.,*:;]|%[a-f\d]{2,4})+=(?:[-\w~!\$+|.,*:]|%[a-f\d]{2,4})*(?:&(?:[-\w~!\$+|.,*:;]|%[a-f\d]{2,4})+=(?:[-\w~!\$+|.,*:]|%[a-f\d]{2,4})*)*)?(?:\#(?:[-\w~!\$+|&.,*:;=]|%[a-f\d]{2,4})*)?)?$', + }, @_) or return undef;