From a1632dacd7cd7b054d732f468e1a58eaff23a767 Mon Sep 17 00:00:00 2001 From: short <> Date: Mon, 7 Jan 2002 02:29:37 +0000 Subject: [PATCH] We now really display the pattern itself, NOT the matched string --- redirector | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/redirector b/redirector index 74d3b58..1d7718b 100755 --- a/redirector +++ b/redirector @@ -5,6 +5,8 @@ use strict; use warnings; +use re 'eval'; + use constant DIR_AD => "/usr/local/squid/etc/ad"; @@ -16,7 +18,9 @@ while () { chomp; next if !$_; $patt.="|" if $patt; - $patt.=$_; + $patt.=$_."(?{ '"; + s/'/'."'".'/g; + $patt.="$_'; })"; } close M4; @@ -24,6 +28,6 @@ select STDOUT; $|=1; while (<>) { - s@^http://($patt).*\n$@http://localhost/cgi-bin/redirector-ad.cgi?$1\n@os; + s@^http://($patt).*\n$@http://localhost/cgi-bin/redirector-ad.cgi?$^R\n@os; print; } -- 1.8.3.1