Skip to content

Commit 418374b

Browse files
committed
Regex -q
1 parent dc3f1c8 commit 418374b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/msu_finder.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ def initialize
294294
# @param keyword [String] The product to look for.
295295
# @return [Array<String>]
296296
def find_msb_numbers(keyword)
297-
product_list_matches = get_product_dropdown_list.select { |p| /^#{keyword}/ === p[:option_text] }
297+
product_list_matches = get_product_dropdown_list.select { |p| Regexp.new(keyword) === p[:option_text] }
298298
if product_list_matches.empty?
299299
print_debug("Did not find a match from the product list, attempting a generic search")
300300
search_by_keyword(keyword)
@@ -573,7 +573,7 @@ def self.get_parsed_options
573573
opt.separator ''
574574
opt.separator 'Specific options:'
575575

576-
opt.on('-q', '--query <keyword>', 'Keyword to search') do |v|
576+
opt.on('-q', '--query <keyword>', 'Regex keyword to search') do |v|
577577
options[:keyword] = v
578578
end
579579

@@ -588,7 +588,7 @@ def self.get_parsed_options
588588
end
589589
end
590590

591-
opt.on('-r', '--regex <string>', '(Optional) Search filter') do |v|
591+
opt.on('-r', '--regex <string>', '(Optional) Regex download links') do |v|
592592
options[:regex] = v
593593
end
594594

0 commit comments

Comments
 (0)