Folks;

I need some help on my regex. Given a string such as "1234-abc" or "1234 abc" or "1234abc", I simply want to use a regex that splits the string into two parts. i.e. "1234" and "abc". So the output would be an array like so: array[0] = "1234" and array[1] = "abc".

Here is my current code which works fine for the number part, but does not handle the text part correctly.

PHP Code:
 <html>

<
head>

<
script type="text/javascript">

function 
doit(){
var 
input   "1234-abc";
var 
numberinput.match(/\d+/)[0];      //this currently prints 1234
var text input.match(/[\w]{0,200}\d/)[0];  //but this prints abc1234

document.write(number);
document.write(text);

}

doit();

</script>
</head>
<body>

</body>
</head>