title: How to split string without getting empty values to the output array
body: <p>I am using <a href="http://www.w3schools.com/jsref/jsref_split.asp" rel="noreferrer">split</a> function to split my string <code>/value/1</code></p>
  
  <pre><code>var value = "/value/1/";
  
  var arr = value.split("/");
  </code></pre>
  
  <p>in result I will get an array with 4 elements "", "value", "1", "";
  But I really need the nonempty values in the output array.
  Is there any way to produce an array base on my input string but array without blank elements?</p>
  
  <p>My string could be <code>/value/1/</code> <code>/value/1</code> <code>/value/</code> <code>/value</code> basically I am precessing <code>http request.url</code>.</p>