aboutsummaryrefslogtreecommitdiff
path: root/sbofind
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2019-04-28 00:51:37 +0200
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2019-04-28 00:59:00 +0200
commitea1aca5c9c4eec40eabb2fe273303d7b330ae613 (patch)
tree71aa84edec6b1cfa1eb25ca8003186f1e14f0bd7 /sbofind
parent7fcae080e22e9929f874d337b26986f84999c8e2 (diff)
downloadsbotools-ea1aca5c9c4eec40eabb2fe273303d7b330ae613.tar.xz
sbofind: really fix exact matches
Closes #71.
Diffstat (limited to 'sbofind')
-rwxr-xr-xsbofind2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbofind b/sbofind
index 2659076..8424bf1 100755
--- a/sbofind
+++ b/sbofind
@@ -72,7 +72,7 @@ sub perform_search {
script_error 'perform_search requires an argument.' unless @_ == 1;
my $search_arg = shift;
my $search_tag_re = $search_exact ? qr/^(\S+).*(:\s|,)\b\Q$search_arg\E\b(,|$)/i : qr/^(\S+):\s.*\Q$search_arg\E/i;
- my $search_name_re = $search_exact ? qr/\Q$search_arg\E/i : qr/.*\Q$search_arg\E.*/i;
+ my $search_name_re = $search_exact ? qr/^\Q$search_arg\E$/i : qr/.*\Q$search_arg\E.*/i;
# first get a bunch of names from the TAGS.txt if it's available
my $tags_file = "$config{SBO_HOME}/repo/TAGS.txt";