Test, validate and match regular expressions
Matches complete HTML <script> elements, including the opening tag with attributes, all inline JavaScript content, and the closing </script> tag. The tempered pattern permits '<' characters inside the code body as long as they don't start the closing tag. Commonly used to strip script blocks from HTML for sanitization, XSS prevention, or plain-text extraction. The 'gi' flags make matching case-insensitive and remove every occurrence.