Using .split() with Regex, what is the proper way to perform a split with using whitespace with multiple characters?
For example, with a string like:
const str = 'Supreme > 22 < 27 < 34> 185';
the expected outcome would be:
const output = ['Supreme', '> 22', '< 27', '< 34', '> 185'];
I have attempted using .split() with the pattern /.+?(?=>|<)/, but it returns the opposite like:
const opposite = [ '', '', '', '', '> 185' ]