I have a really long list of tuples that I want to insert into a database (db type is irrelevant for the question). I have to call a db function with all values from one day at a time. My question is now: how can I find the break between two days' rows? My data looks like this:
/* '2020-01-01' */ ('UniqueKey', 'val1'),
/* '2020-01-01' */ ('UniqueKey', 'val2'),
/* '2020-01-01' */ ('UniqueKey', 'val3'),
/* '2020-02-01' */ ('UniqueKey', 'val1'),
/* '2020-02-01' */ ('UniqueKey', 'val2'),
/* '2020-02-01' */ ('UniqueKey', 'val3'),
/* '2020-02-01' */ ('UniqueKey', 'val4'),
/* '2020-02-01' */ ('UniqueKey', 'val5'),
and I'd like to insert some code between the last line containing '2020-01-01' and the first line containing '2020-02-01' and so on, i.e. some code between any two lines that differ by date.
I am using Visual Studio Code, so a regex suitable for that editor would be appreciated, but any flavor of regex would do.
So which regex can I use for search and replace to insert my code snippet?