preg replace h2 tags with spaces [closed]
- by fire
Possible Duplicate:
PHP Regular express to remove <h1> tags (and their content)
I have some HTML that looks like this:
<h2>
Fund Management</h2>
<p>
The majority of property investments are now made via our Funds.</p>
Trying to use a regular expression to strip h2 tags but doesn't work because of the space between the opening and closing h2 tags.
preg_replace('/<h2>(.+?)<\/h2>/', '', $content);
Any ideas on how to make this work?
Also I would ideally like it to replace h1-h6 tags so maybe it needs [1-6] or something?