global replace spaces, make regex case insensitive
allow for patterns containing punctuation, metacharacters
Merge pull request #432 from wcaleb/searchjs-tweaks

Improvements to search.js