I have an example statement:
"function(){var x=0;if(true){var y=0;}}"
I have tried many expressions but they only return the "{var y=0;}"
I want to extract the following result:
["{var x=0;if(true){var y=0;}}","{var y=0;}"]
What is the best possible regex for this?
I only use JavaScript so lookbehinds are not possible.