title: Output only values that do not contain HTML tags in parentheses from PHP array
body: <p>Here is a sample PHP array that explains my question well</p>
  
  <pre><code>$array = array('1' =&gt; 'Cookie Monster (&lt;i&gt;eats cookies&lt;/i&gt;)',
                 '2' =&gt; 'Tiger (eats meat)',
                 '3' =&gt; 'Muzzy (eats &lt;u&gt;clocks&lt;/u&gt;)',
                 '4' =&gt; 'Cow (eats grass)');
  </code></pre>
  
  <p>All I need is to return only values that don't contain any tag enclosed with parentheses from this array:</p>
  
  <pre><code>- Tiger (eats meat)
  - Cow (eats grass)
  </code></pre>
  
  <p>For this I'm going to use the following code:</p>
  
  <pre><code>$array_no_tags = preg_grep("/[A-Za-z]\s\(^((?!&lt;(.*?)(\h*).*?&gt;(.*?)&lt;\/\1&gt;).)*$\)/", $array);
  foreach ($array_no_tags as $a_n_t) {echo "- ".$a_n_t."&lt;br /&gt;";}
  </code></pre>
  
  <p>Assuming that <code>[A-Za-z]</code> may be <strong>whoever</strong>, <code>\s</code> is a <strong>space</strong>, <code>\(</code> is the <strong>opening parenthesis</strong>, <code>^((?!</code> is <strong>start</strong> of the tag denial statement, <code>&lt;(.*?)(\h*).*?&gt;(.*?)&lt;\/\1&gt;</code> is the <strong>tag</strong> itself, <code>).)*$</code> is <strong>end</strong> of the tag denial statement and <code>\)</code> is the <strong>closing parenthesis</strong>.</p>
  
  <p>Nothing works.</p>
  
  <p><code>print_r($array_no_tags);</code> returns empty array.</p>