I am working with a script obfuscation class to output stored javascripts as a strings into a singlular output.
the problem is that customers of course will copy in the or
I am currently using
$script = str_replace('</script>', "", $script);
$script = str_replace('<script>', "", $script);
$script = str_replace('<script type="text/javascript">', "", $script);
But would love to use a preg_replace expression to handle it.
basically <script + anything up to the >
and </script>
would need to be removed.
I am not very familiar with regular expressions syntax as I have not worked with them in them much.
I do not want to use dom just in case that was going to be a suggestion.
Thanks in advance for any assistance.