One additional thing that I’m noticing as I start to use this on a larger (2.7mb) file replace. I haven’t had the opportunity to dig too deeply into it just yet, but using the same filter/regex/file-replace it seems like the response gets stuck. Initially I thought it was due to the multiple replace that was happening with the first regex, however, even with the new regex the response seems to take an extremely long time. For that I’m also using a javascript file, which I don’t think would make a huge difference, but who knows. I’ll see if I can get a test scenario set-up to reproduce the issue when I have some more time.
Thank you everyone for sticking with this. I feel like options 1 and 3 may be safer overall (if my opnion holds any weight)
Option 2 seems like it could break regexes that people already have in place.