From 1b88a427f63a9129b245749c4ea5759aa8e619d7 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Tue, 11 Oct 2005 14:00:36 +0000 Subject: strict_match option on a media name means the whole media name, not only a whole word --- urpm.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/urpm.pm b/urpm.pm index b75ebbfb..aaa091e2 100644 --- a/urpm.pm +++ b/urpm.pm @@ -849,8 +849,8 @@ sub select_media { unless ($media{$_}) { my $q = quotemeta; my (@found, @foundi); - my $regex = $options->{strict_match} ? qr/\b$q\b/ : qr/$q/; - my $regexi = $options->{strict_match} ? qr/\b$q\b/i : qr/$q/i; + my $regex = $options->{strict_match} ? qr/^$q$/ : qr/$q/; + my $regexi = $options->{strict_match} ? qr/^$q$/i : qr/$q/i; foreach my $medium (@{$urpm->{media}}) { $medium->{name} =~ $regex and push @found, $medium; $medium->{name} =~ $regexi and push @foundi, $medium; -- cgit v1.2.1