I am looking to create a regular expression to get texts that do not contain html and / or PHP tags within a string.
<div class="my_class">
<div class="copy">
© 2018 Texto
</div>
</div>
So far, I have the following regular expression
[^\s<\?ph?(h2|a ref="#")>].+\w+((?=<)|[^</*>]$)
but it is still incomplete, because if I add the following it does not work:
<div class="my_class">
<h1>¿como estas?</h1>
<div class="copy">
© 2018 Texto
</div>
<?php
$valor = $CI->session->getSessionData('Mivalor');
?>
does not select "how are you?" and "session-> getSessionData ('Mivalor'); ? > "