Is it possible to split on any number of a character in JavaScript, possibly with a regex?
Example:
"These are ____ underscores" will return ["These are ", " underscores"]
Here's what I have so far:
"These are ____ underscores".split("_").filter(x => x);
Run Code Online (Sandbox Code Playgroud)
However, I am not sure if there is a more efficient/better way to do this.
Thanks.
javascript ×1