Test, validate and match regular expressions
Extracts named placeholder keys from Python format strings by matching text preceded by either `{` (new-style .format() syntax) or `%(` (old-style percent formatting), and followed by `}` or `)`. Ideal for pulling argument names like 'name' from '{name}' or 'key' from '%(key)s'. Commonly used in i18n/localization tooling, template analysis, or validating format string arguments.