ssborbis / ContextSearch-web-ext

Search engine manager for modern browsers
318 stars 35 forks source link

Issue in the {searchTerms} #635

Closed MW-J97 closed 1 year ago

MW-J97 commented 1 year ago

Hello, I made an engine to search a website called My Flixer. It's working fine if I search a single word. But, when I search 2 or more, it gives me error. The issue is in {searchTerms}, it separates the 2 searched words by (20%), and in the site the separation is by (-). E.g., this is the search link in the site https://myflixer.to/search/john-wick and this is in the CS search https://myflixer.to/search/john%20wick How can I fix this??

ssborbis commented 1 year ago

use the regex field to replace spaces with hyphens

/\s+/-/g I think?

MW-J97 commented 1 year ago

use the regex field to replace spaces with hyphens

/\s+/-/g I think?

Thanks for help, it works. Can you give me a hint about how it works?

ssborbis commented 1 year ago

It's similar to a sed replacement https://linuxize.com/post/how-to-use-sed-to-find-and-replace-string-in-files/

https://regexr.com/

/regexToReplace/replacementString/modifiers [gi...]