title: How split a string in jquery with multiple strings as separator
body: <p>i want to split a string in jquery or javascript with multiple separator.<br>
  for one string as separator we can have :  </p>
  
  <pre><code>var x = "Name: John Doe\nAge: 30\nBirth Date: 12/12/1981";
  var pieces = x.split("\n"), part;
  for (var i = 0; i &lt; pieces.length; i++) {
           bla bla bla
  }
  </code></pre>
  
  <p>But i want to split such that string(x) with : <code>Age:</code> and <code>Date:</code> (mean a string array as separator)<br>
  and at last i want a sting array with these parts : "Name: John Doe\n"," 30\nBirth "," 12/12/1981"<br>
  that x string is just an example and i dont have any string like that!
  how can i rewrite theses codes?  </p>