When I search on various website such Google, Twitter, etc., I often use exact match search.
That is, surround the word with double quotes.
Example
test apple orange-juice
↓
"test" "apple" "orange-juice"
I would like to create some macro with a KM shortcut to avoid having to manually add double quotes to multiple words.
After doing some research myself, I think maybe I should use regular expressions, but I can't understand how to write them specifically...
You don't need a regular expression. @DanThomas's is very neat, and well explained, but sometimes it's easier to use something that's less efficient but that you already understand. In this case you just want to replace every space with quote-space-quote
test apple orange-juice -> test" "apple" "orange-juice
Thank you very much Nige_S, I tried @DanThomas 's idea, and succeed, but I want to understand your idea too.
So I made this macro, but It doesn't work.
Surely I must have misunderstood something, because I have no idea what Local My Search means.
Would your idea allow me to avoid having to copy and paste the words?
For original purpose, there's no need to store it in the system clipboard, so it would be great if I could just replace it directly in the search input field.
Thank you very much.
Sorry, I should have said. I put the changed text into the variable Local_mySearch rather than changing the contents of the clipboard -- which you may or may not want to happen. In this case you do because you are using copy and paste to change the search field.