Test, validate and match regular expressions
This regex matches various forms of ${...} placeholders, including simple variable names (e.g., ${var}), nested expressions like ${${inner}}, and multi-brace patterns with trailing braces. It captures the token inside the outer braces, making it useful for parsing template literals, configuration files, or build scripts that use placeholder syntax.