JSFiddle - React, Tailwind, and code Playground
by Scott Wright
JavaScript
var text = "<div>The Quick brown fox ran through it's forest darkly!</div>"
//this one uses spaces only but will match "darkly!</div>" as 1 element
console.log(text.match(/\S+/g));
/*
I want a matching expression that will output:
["<div>", "The", "Quick", "brown", "fox", "ran", "through", "it's", "forest", "darkly", "!", "</div>"]
The issue is matching any html tag and punctuation other than apostrophe seperately
*/