title: How to write this is RegEx format for java to use the the pattern.compile
body: <p>So for my assignment, I need to check the input if it is in the correct format and have no other information. I found out about using regex and the Pattern and the <code>compile</code> function, but I just need this code in regex format. I looked up stuff on the internet and figured this
   part out </p>
  
  <pre><code>1. For phone : ( ### ) - ### - ###
  2. Name :  Abc Def
  3. Email :  abc.def@ghi.com
  
  Name: [A-Z][a-z]+[ ][A-Z][a-z]+ 
  Phone : ([0-9][0-9][0-9])-[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] 
  Email : [a-z]([a-z])*(.[a-z]+)*@[a-z]+.(a-z)+ 
  
  </code></pre>
  
  <p>For Email: </p>
  
  <pre><code>String emailRegex = "\"^[_A-Za-z0-9-]+(\\\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\""; 
  
  //this is just some random code that I dont even understand     
  Pattern pattern = Pattern.compile(emailRegex);      
  if (pattern.matcher(email).matches()) {             
       System.out.println(email);
  }else {
      //Further processing
  }
  </code></pre>
  
  <blockquote>
    <p>So I just need to figure out how to convert it into Regex code that I can use it to compare it to the input string*</p>
  </blockquote>