I have a sentence which contains attributes : "hey how <span target="">you</span>"
I would like to put 'hey', 'how', '<span target="">you</span>'
in an array.
I used string.split(' ')
and got ['hey','how','<span','target="">you</span>']
Is it possible to split all the words and use at the same time the regex in order to catch the words which begin with <
and finish with >
?
Thank you