I'm running into an issue with the following.
I need to clean up HTML before rendering it to the browser.
The current regex matches everthing like "{varname}" no problems so far, however I need to exclude matches which are found within script tags.
*Example was a bit unclear, so updated * Example:
<html>
<head></head>
<body>
this is an example `{var}` variable, <- this should be matched/removed
<script>
// don't match below arguments in other words don't let regex remove them/match them
myMethod("{param1:'foo', param2:'bar'}");
</script>
</body>
</html>