Skip to content

Commit

Permalink
Merge pull request #447 from makyen/Makyen-Dont-error-on-non-capture-…
Browse files Browse the repository at this point in the history
…group

Prevent errors when a non-capturing group is used in a regex search.
  • Loading branch information
thesecretmaster committed May 28, 2018
2 parents 6bb19f0 + 99bf1f4 commit 1823ad5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/helpers/search_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ def self.parse_search_params(params, symbol, user)
'\s' => '[\r\n\t\f\v ]',
'\S' => '[^\r\n\t\f\v ]',
'\d' => '[0-9]',
'\D' => '[^0-9]'
'\D' => '[^0-9]',
'(?:' => '('
}
regex_support.each { |k, v| input = input.gsub(k, v) }
else
Expand Down

0 comments on commit 1823ad5

Please sign in to comment.