title: Java - Extract data from Document with Regex
body: <p>I have a dataset of resume and I want to extract data from each resume 
  I will give an example as a sample to what I need </p>
  
  <pre><code>String test= "Worked in Innovision Information System Private Limited as Project Trainee-Content Writing from Date to Date.";
  </code></pre>
  
  <p>I want to extract the <code>company name</code>, <code>role (designation)</code>, and <code>Date (From-to)</code></p>
  
  <p>I'm new to regex so please correct me if I'm wrong</p>
  
  <p>the first thing I tried to extract each one of them separately </p>
  
  <pre><code>String regexStr5="Worked in:? \\w+" ;
  String regexStr6 ="as:? ([a-zA-Z ]+)";  
  </code></pre>
  
  <p>and for the date <code>Date : (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{1,2}, \d{4}</code></p>
  
  <p>How can I put them all together in the same regex?!! 
  and print the <code>company-Name +role+date</code> </p>