topical media & game development

talk show tell print

basic-javascript-08-ch8-examp3.htm / htm



  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
  <html>
  <body>
  <script language="JavaScript" type="text/JavaScript">
  var myListString = "apple, 0.99, banana, 0.50, peach, 0.25, orange, 0.75";
  var theRegExp = /[^a-z]+/i;
  var myFruitArray = myListString.split(theRegExp);
  document.write(myFruitArray.join("<br>"));
  </script>
  </body>
  </html>
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.