I'm trying to create a a regex that matches 2 or more spaces, or tabs, basically a combination of text.split(" ")
and text.split("\t")
. How do I create it?
My attempt: (but it doesn't work)
text.split(new RegExp("[ |\t]"))
Edit: This splits at spaces/tabs but I need to split at 2 spaces or more..
text.split("\\s+");