I'm trying to create regex for checking if password got special characters. https://www.owasp.org/index.php/Password_special_characters It looks like this
new RegExp('[!@#\$%\^\&*\)\(+=._\'",/<>?[\\\]`{|}~:;-\s]', 'g');
Unfortunately is also catching bare words: reg.test('word') it returns true. Whats wrong with my regex?