PHP regex content between tags with square brackets : <p>I am trying to create a regex that will give me everything that appears between <code>[start-flashcards]</code> and <code>[end-flashcards]</code></p>

<p>I am using <code>\[start-flashcards\](.*?)\[end-flashcards\]</code> but this doesn't match. I must be missing something? </p>

<pre><code>&lt;p&gt;[start-flashcards]&lt;/p&gt;
  &lt;p&gt;[London|This is the capital city of the United Kingdom]&lt;/p&gt;
  &lt;p&gt;[Paris|This is the capital city of France]&lt;/p&gt;
  &lt;p&gt;[Madrid|This is the capital city of Spain]&lt;/p&gt;
  &lt;p&gt;[Tokyo|This is the capital city of Japan]&lt;/p&gt;
  &lt;p&gt;[Moscow|This is the capital city of Russia]&lt;/p&gt;
&lt;p&gt;[end-flashcards]&lt;/p&gt;
</code></pre>
