mystring = "9862 ....... -pack size 1 - SST Unspun Label (Roll) CAT#: 9862"

I want to get the first 4 numbers in this string "9862". How do I get the first sequence of numbers in this string. And store it in anothoer variable?

Javascript doesn't seem to be recognizing this variable. I don't know why. if I do:

alert(mystring); //I don't get an alert pop up nor does it show any errors.

Could there something be wrong with the text I'm trying to store in 'mystring' variable?

Edit
Report