Test, validate and match regular expressions
This regex matches template placeholder expressions in the form #{...}, such as #{name} or #{ value }, capturing the entire expression including its delimiters. It permits optional whitespace inside the braces surrounding the content, and the non-greedy .*? ensures it stops at the first closing brace on the same line. It's useful for extracting or substituting interpolation tokens in templating engines, Ruby-style interpolation, MyBatis, or custom config templates.