There are dots here that need to be escaped. And this would be better written as a JS regex literal.