php text h1 style huj PIZDA h1 zaebis preg_replace text echo zaebis PI

1
2
3
4
5
<?php
$text = '<h1 style="huj">PIZDA</h1>';
$zaebis = preg_replace('/<.*?>(.*?)<\/.*?>/', '$1', $text);
echo $zaebis; //PIZDA