Regexp: |(OR) condition doesn't work
<p>Can't figure out why OR condition in my regexp isn't working.</p>

<pre><code>    $str = "                            &lt;li&gt;&lt;a href=\"\" class=\"gateway-image\"&gt;&lt;img src=\"&lt;?=theme_url()?&gt;/images/Cherry Credits.jpg\" alt=\"\"/&gt;&lt;/a&gt;&lt;/li&gt;
                        &lt;li&gt;&lt;a href=\"\" class=\"gateway-image\"&gt;&lt;img src=\"&lt;?=theme_url()?&gt;/images/gudangvoucher.jpeg\" alt=\"\" style=\"width: 140px!important\"/&gt;&lt;/a&gt;&lt;/li&gt;";

    $regexp = '/^(.*\&lt;li\&gt;\&lt;a href\=)(.*cherry|credits.*)$/im';
    preg_match($regexp, $str, $m);
</code></pre>

<p>It seems regexp is correct but it can't find string <code>Cherry Credits.jpg</code> as I expected. What is wrong?</p>