preg_match meta name OR property : <p>How to impliment an OR here to match <code>meta</code> with both <code>name</code> and <code>property</code></p>

<pre><code>$html = '&lt;meta name="title" content="title here.."&gt;
         &lt;meta name="keywords" content="keywords here.."&gt;
         &lt;meta property="og:title" content="og title here.."&gt;'

preg_match_all('/&lt;[\s]*meta[\s]*name="?' . '([^&gt;"]*)"?[\s]*' . 'content="?([^&gt;"]*)"?[\s]*[\/]?[\s]*&gt;/si', $html, $match);
</code></pre>

<p>output</p>

<pre><code>Array
(
    [0] =&gt; Array
        (
            [0] =&gt; &lt;meta name="title" content="title here.."&gt;
            [1] =&gt; &lt;meta name="keywords" content="keywords here.."&gt;
         // [2] &lt;meta property="og:title" content="og title here.."&gt;
        )

    [1] =&gt; Array
        (
            [0] =&gt; title
            [1] =&gt; keywords
         // [2] =&gt; og:title
        )

    [2] =&gt; Array
        (
            [0] =&gt; title here..
            [1] =&gt; keywords here..
         // [2] =&gt; og title here..
        )

)
</code></pre>
