title: Javascript: How to get the first 4 numbers in a string?
body: <pre><code>mystring = "9862 ....... -pack size 1 - SST Unspun Label (Roll) CAT#: 9862"
  </code></pre>
  
  <p>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?</p>
  
  <p>Javascript doesn't seem to be recognizing this variable. I don't know why.
  if I do:</p>
  
  <pre><code>alert(mystring); //I don't get an alert pop up nor does it show any errors.
  </code></pre>
  
  <p>Could there something be wrong with the text I'm trying to store in 'mystring' variable?</p>