bib
bib

Reputation: 31

Split multiline text by space and line break

Can you pass several options as the argument to .split? Trying to get or/and behavior.

Upvotes: 1

Views: 234

Answers (1)

GirkovArpa
GirkovArpa

Reputation: 4942

`Hello World!\nBye World!`.split(/ |\n/); // ["Hello", "World!", "Bye", "World!"]

Upvotes: 1

Related Questions