Test, validate and match regular expressions
This regex matches HTML opening tags (including self-closing ones) that contain a style attribute, capturing the tag name, the quote character surrounding the style value, and any trailing forward slash. The case-insensitive flag ensures it matches 'style=' regardless of casing, while the global flag processes all occurrences. It's typically used in a find-and-replace operation to strip inline style attributes from HTML, for example replacing matches with <$1$3> to rebuild the tag without the style attribute.