Swap Table Names Between Inserts And Selects on the Same Line using Regular Expressions

Background: For the past few days weeks, I have been working on a way to export selective data from one schema to import into another. Now the problem is that “selective” data refers to the data as stored across various tables in the custom application that I’ve been working on, with elaborate relational links between the tables ( if you’re curious, the table count on the related data was about