I need to remove all tags along with the content and the closing of the tag when the tag is being scripted. Example $ variable="SomethingSomething2some javascript function";
I want to remove this all from html
<script>alguma funcao javascript</script>
The idea is like this
$variavel = preg_replace('<script*>*</script>', '', $variavel);
But it did not work. Explaining the regex how it should look: It will give replace when you start with