PHP Question – Removing tags and content

This is mainly out there to those who code in php.
At the moment LibDemBlogs, strips out all formatting from blog posts, mainly to ensure that cut-off <b> tags don’t end up bolding everything, but also it puts each post on a equal platform.
However over time I’ve noticed an increase use in the <strike> tag. This tag strikes through text and is normally used to later correct a mistake, or imply someone might not be telling the truth. But as LDBlogs removes the formatting, it makes for an odd read.
So I’m trying to completly remove everything between the tags, Google and even myself believe that this should work
$post = preg_replace('/<strike>([^>]*)<\/strike>/i', '', $post);
However LDBlogs is still showing the deleted text. Any other ideas?

Fixed! The code was working, just happened that the bit of the WordPress RSS feeds I was reading had already removed the tags and other stuff, reading the <content:encoded> gives me the original text.

Leave a Reply

Your email address will not be published. Required fields are marked *

Human test: Enter Ryan backwards