Hay, i can't seem to find any regular expressions online to remove
<h1></h1>
tags (and their content).
Anyone lend a hand on this and help.
Don't use a regex, use a tool like PHP Simple HTML DOM.
// Construct dom from string $dom = str_get_html($html); // ...or construct dom from file/url $dom = file_get_html($path); // strip h1 tags (and their content) foreach ($dom->find('h1') as $node) { $node->outertext = ''; }
1.4m articles
1.4m replys
5 comments
57.0k users