I am trying to make something similar to the way that jQuery uses strings to determine HTML elements. I tried using a split function to make it become a list of the different values but instead it returned an array with 20 empty strings.
console.log('button#hello.something'.split(/.|#/))
And the result is:
[
'', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '',
'', '', '', '', '', '', ''
]