I want to convert this php regex to js regex, to get same result. Please, check live here..
/(\{(?>[^{}]+|(?1))*\})/m
want matches like this:
https://regex101.com/r/EYhxny/1
Unfortunately, javascript PCRE doesn't have recursive parameters ( (?1) (?R), etc). But you can try use loop for all matching.