Regex: Grouping expressions of a kind

I was recently presented with a task: I had a CSV database dump that I had to turn back into MySQL queries of a different format. My toolset was everything that Sublime Text 3 had to offer (which is a lot of great tools) – though eventually it was narrowed down to a plugin and ST3’s macro functionality – and the awesome power of regular expressions. As I was working on this task, however, I ran into a problem which took me a few hours to resolve – but its solution is interesting, and in my opinion deserving of an article. Continue reading Regex: Grouping expressions of a kind