- Detect valleys of a signal
- How do you interpret a pneumatic regulator symbol?
- Equation for water rower
- Is it possible to quantify & cost the ideological obstruction to climate change?
- I need a way for a NASA spaceship to be able to dock with the hatch of an alien ship
- Can an alien civilization develop without money?
- How to cause a surge in large carnivore diversity, roughly 5-7 million years hence?
- Taking control of the Human population with nanobots
- Except for baudhyana dharma sutras which other dharma sastras talk about loss of caste due to sea voyage?
- Upgraded to Craft 3 and lost my Commerce Gateways
- Falcon Circus, Chapter 2: The Wise
- Welcome to the Jungles of South America
- Zeebus Puzzle #1
- An Incredible Theory
- Homophone riddle
- Symlink or Rename files with spaces?
- Hierarchical Single-Link Clustering BGP Updates
- GAN isn't stable
- I need sources of interrogative, exclamatory, and imperative sentences
- Segmenting an Age Column
Duplicating a row and modifying the duplicate as a macro or regex
Given a file with multiple lines matching this pattern (apologies for the length!)
$this->execSQL('INSERT INTO `table_lowercase_and_underscores` (`id`, `field1`, `field2`, `field3`, `field4`, `field5`) VALUES (\'first-guuid-lowercase-numbers-hyphens\', \'guuid-lowercase-numbers-hyphens\', \'guuid-lowercase-numbers-hyphens\', 0, \'2018-04-09 03:58:59\', 0);');
I would like to visually select multiple of these lines and apply a macro or regex replacement to yield the following pattern below each target line:
$this->execSQL('DELETE FROM `table_lowercase_and_underscores` WHERE id = \'first-guuid-lowercase-numbers-hyphens\';');
I know I can capture the first backtick contents with something like
And could grab the first match of \'something'\ into 2 capture groups, but how would I then get those into a new line following the first?
Would this be easier to tackle as a macro to duplicate the line and then replace a few parts?