Thanks for the kind words Friendly_Ghost, and thanks for making the script :) . Honestly, I spent some hour or two faffing about with it since my understanding of Overpass is somewhat surface level but if you're curious, I've copied up the exact script I used in the Overpass API through JOSM in this pastebin, along with some comments of my rudimentary understanding.
https://pastebin.com/3LB5YY7T
I didn't change any of the actual regex stuff, just the area which is searched, and a few bits at start and end so that I could run it through JOSM instead of Overpass Turbo.