What is the regex to check if a string is not all spaces (spaces = spacebar, tab etc.)? It's ok if there is at least one or more non space characters in string.
Example:
str = '' // not allowed
str = ' ' // not allowed
str = ' d' // allowed
str = 'a ' // allowed
str = ' d ' // allowed
str = ' @s ' // allowed
I was trying this, but this seems to return true for everything...
str = ' a';
regex = /[\s]+/g;;
console.log(regex.test(str));
P.S I cannot use trim in here.