JS Substring 4 Numbwe Pertama

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

mystring = mystring.substring(0, 4);

alert(mystring.trim());
Borma