Updated regex fix to use escape-string-regexp module.