JS Substring First 4 Numbwe

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

mystring = mystring.substring(0, 4);

alert(mystring.trim());
Borma