title: PHP regex to search across multiple lines
body: <p>I'm using preg_* in PHP to search for the pattern <code>&lt;!-- %{data=THIS GETS MATCHED}% --&gt;</code> and pull out the matched text.</p>
  
  <p>The pattern for this is:</p>
  
  <pre><code>preg_match('#&lt;!-- %{' . $knownString . '\s*=\s*(.*?)}% --&gt;#', ...)
  </code></pre>
  
  <p>What I would like it to do is search across multiple lines for the string. For example:</p>
  
  <pre><code>&lt;!-- %{data=
  THIS GETS
  MATCHED AND
  RETURNED
  }% --&gt;
  </code></pre>
  
  <p>How can I edit my current pattern to have this search ability?</p>