From 432f36ed072e94d757874082ec3d0a668182b281 Mon Sep 17 00:00:00 2001 From: Mason James Date: Fri, 29 Feb 2008 13:38:15 +1300 Subject: [PATCH] wrapping regex in \Q$value\E to handle tricky strings eg: 'c++' Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- C4/Search.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Search.pm b/C4/Search.pm index 12ee86511c..0310c7720a 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1799,7 +1799,7 @@ sub NZoperatorAND{ my $value = $_; my $countvalue; ( $value, $countvalue ) = ( $1, $2 ) if ($value=~/(.*)-(\d+)$/); - if ( $rightresult =~ /$value-(\d+);/ ) { + if ( $rightresult =~ /\Q$value\E-(\d+);/ ) { $countvalue = ( $1 > $countvalue ? $countvalue : $1 ); $finalresult .= "$value-$countvalue;$value-$countvalue;"; -- 2.39.5