JSFiddle - React, Tailwind, and code Playground

HTML

<script type="text/javascript">
function test(string) {
        var match = /<script[^>]*>.*?<\/script>/i.test(string);
        return match ? 'match :(' : 'bypass :)';
}
    var s=test('<script>confirm(document.cookie)<\/script>');
alert(s);
</script>