title: PHP regex multi-line
body: <p>I have the following PHP regex</p>
  
  <pre><code>preg_match('/[\/\/\*] First: (.*)\n[\/\/\*] Second: (.*)\n/i', $some_string)
  </code></pre>
  
  <p>but for some reason it will not match this text:</p>
  
  <pre><code>// First: a string
  // Second: another string
  </code></pre>
  
  <p>I tried changing line endings between Windows and Unix style, this did nothing. I also tried splitting up the regex to match First and Second separately; this worked but when I put them both together they no longer match the sample text. It seems to have something to do with the space after the second <code>[\/\/\*]</code>.. any ideas?</p>
  
  <p>Note I can't change the regex; this is client code that I reversed because they don't provide documentation. This code looks for certain pattern in PHP files in order to load them as 'plugins' in their product. Really I'm trying to guess what header I need to add to these PHP files so they will correctly be recognized as plugins.</p>