How to check in JavaScript if the specified character is not a whitespace using regex only? Right now I am doing something like the code below with negation !
but I would like to avoid mixing of two things to avoid confusions.
if (!/\s/.test(character))
console.log('this is not a whitespace');