Skip to content

Muller Digital Inc.

Toronto based web development

Tag: HTML

Replace HTML tags with PHP

preg_replace(‘@< (iframe|script|noscript)\b.*?>.*?@si’, ”, $string); Removes iframe, script and noscript tags and contents from $string. Performs an inverted version of strip_tags function.

Published March 21, 2012
Categorized as Programming, Web Tagged HTML, PHP, programming, RegExp

Recent Posts

  • Removing Meta Data from Images; Achieve Higher Image Compression
  • Batch Reduce Image Size, in One Line Command
  • Ubuntu/Debian Notification After Command Has Run
  • WP CLI – Change Blog Domain
  • Git; Get All Branches Last Commit Date and Time

Recent Comments

  • Websiteguy on Easy Regular Expression Testing
  • nick on AWS micro EC2 instance WordPress LAMP stack optimized low memory settings
  • Websiteguy on AWS micro EC2 instance WordPress LAMP stack optimized low memory settings
  • Ben on How to Get The Domain and TLD from a URL using PHP and Regular Expression
  • Home
  • About
  • Services
  • Contact
Muller Digital Inc.
Proudly powered by WordPress.