27451: Escape RegExp meta chars in search string

Also do global replacement of spaces instead of single replacement