I need a greedy regex to select everything between curly braces but not the starting and ending curly braces for example:
{here {first} and {second} and {third}}
output should be
{first}
,
{second}
{third}
I need a greedy regex to select everything between curly braces but not the starting and ending curly braces for example:
{here {first} and {second} and {third}}
output should be
{first}
,
{second}
{third}
{[^{]+?}
would work for your test case. However, this won't support arbitrary nesting, which is not possible with regex. If that's what you're looking for, you'll need a parser.
Example: https://regex101.com/r/GrqGdS/1
Edit:
if {
is written at places where the cardinality operator cannot occur, there is no need to escape it.