From 17504aa361eef269c57f43c21e16d1705cd1e7c0 Mon Sep 17 00:00:00 2001 From: Rob Hoelz Date: Tue, 9 Sep 2014 19:07:56 -0500 Subject: [PATCH] Make sure strings match along lines This is redundant for most usages of ack, but fixes a bug when using -l --- ack | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ack b/ack index e66f73a0..852ec1c5 100644 --- a/ack +++ b/ack @@ -331,7 +331,7 @@ sub build_regex { $str = "(?i)$str"; } - my $re = eval { qr/$str/ }; + my $re = eval { qr/$str/m }; if ( !$re ) { die "Invalid regex '$str':\n $@"; }