Test, validate and match regular expressions
Matches the encoding attribute declaration in an XML document, such as encoding="UTF-8" found in an XML prolog like <?xml version="1.0" encoding="UTF-8"?>. The capture group extracts the quoted encoding value, including the double quotes (e.g., "UTF-8"). Commonly used for detecting the character encoding of XML files or validating encoding declarations before parsing.