Splitting pasted text in prompt box or UI edittext
I'm trying to allow the user to paste in some lines from Excel into a Prompt() or EditText UI element. Then split it up by the tabs to generate an array of the data pasted. This method of dealing with text data works fine when I'm reading from a text file on disk. However when I try to replicate with pasted data it fails. When I paste the data into a text editor the tabs are intact but the split() function does not seem to recognize them. Here is a piece of text code.
var inText = prompt("Paste the text", "paste here");
alert(inText);
var broken = inText.split(" ");
alert(broken[2]);