Originally Posted by MTK358
Is it OK if the regex contains whitespace, are quotes still not needed?
Nope, but you have to escape the spaces. Bash does "funny" things with your RegEx if you enclose it in quotes. Go ahead and see for yourself what happens:
if [[ $(read ...) =~ "some space .*" ]]; ...
Notice, how '.*' gets mangled. Maybe there is a shopt or setting to control this behavior. Not sure.