I want to split a string by the delimiter \s and , so that 'hello , world , hi yes' returns as [ 'hello', 'world', 'hi', 'yes' ]
Right now I'm using str.split(/[\s,]+/), but the issue with this is that it doesn't compensate for falsely strings such as the empty string or a string that consists of only space.
That is, '' returns [ '' ] and ' ' returns [ '', '' ], but they should just return []
\w{1,}Demo