title: Regex to match two words
body: <p>I am trying to match all statements which contain the following two words</p>
  
  <p>ALPHA and BETA</p>
  
  <p>The regex that I used is </p>
  
  <pre><code>(?=.*ALPHA)(?=.*BETA)
  </code></pre>
  
  <p>I understand this means looking ahead any character for any number occurences check if ALPHA and BETA are present in the given string.</p>
  
  <p>Can someone tell me if there will be any consequence if change the above code to the following. </p>
  
  <pre><code>(?=.*?ALPHA)(?=.*?BETA)
  </code></pre>
  
  <p>What would this additional question mark do?</p>
  
  <p>My input string would be something like "ALPHA|checkagainst|(BETA_val)". 
  The regex I wrote should return true for this above input as both words ALPHA and BETA are present</p>