preg_match_all('{<'.$tag.'[^>]*>(.*?)}', $content, $matches, PREG_PATTERN_ORDER);

Sorun tırnaklarda. Doğrusu bu.