Test, validate and match regular expressions
Matches key=value pairs inside bracketed Minecraft entity selectors (e.g. @e[type=zombie,name="Steve, Jr"]), capturing the key in group 'name' and the value in group 'value'. A lookahead stops the value at a comma or closing bracket, while a quote-parity check ensures the match isn't inside a quoted string, so commas within quoted values don't break parsing. Useful for parsing selector arguments, NBT-like syntax, or any comma-separated key-value list that supports quoted values.