The following regex:
(?!<script[^>]*>)[(.*?)](?![^<]*<\/script>)
Targets every [TEXT] and [INPUT] there is in the input string, except any [] within a script tag.
I would now like to change this, to have the exception to be on a specific script with id="special"
instead.
So <script id="special">[INPUT]</script>
should not be targeted while another script tag without the id special, like <script>[INPUT]</script>
should together with the rest of the string.
I tried adding id="special"
to the above regex before [^>]*>
, but doesn't work.