title: JavaScript String split method delimiter
body: <p>For an assignment, I'm trying to split a phone number in the following format: (555) 555-5555 into 2 pieces. The first is the Area code which should display "555" and the second is the remaining number which should display "555-5555". </p>
  
  <p>I've managed to get answers to display almost perfectly, except the area code displays as "(555)" instead of "555" which is what I need. </p>
  
  <p>How do I make the delimiter look for the numbers in between the parenthesis?</p>
  
  <p>Here's my current code:</p>
  
  <pre><code>function splitButtonPressed()
  {
     var inputString = document.getElementById( "inputField" ).value; //Input field for numbers
     var tokens1 = inputString.split( " " ); 
  
  
     document.getElementById("areaOutput").value = tokens1[0]; 
  
     document.getElementById("numberOutput").value = tokens1[1];
  }
  </code></pre>
  
  <p>EDIT: I've got it to work, Thank You all for your help. </p>