title: What are these javascript syntax called? "/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/"
body: <p>I have the following code as part of my email validation script. I'd like to learn more about the variable <code>reg</code> but don't know how to find relevant information because I do not know what the syntax is called. Could someone direct me to the proper resource or tell me the name of this type of syntax?</p>
  
  <pre><code>function validate(form_id,email) {
     var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
     var address = document.forms[form_id].elements[email].value;
     if(reg.test(address) == false) {
        alert('Invalid Email Address');
        return false;
     }
  }
  </code></pre>