Thread:JoshuaJSlone/@comment-6092594-20180129181848/@comment-131168-20180131011928

OK, so this is as much for me as you, since I'll probably end up doing this elsewhere or very similar tasks and want to see how I did it before.

First, replacing the OtherCoversTabber part became a bit more complicated when I remembered we needed a good way to catch the end bracket too. But regular expression searching for this with. set to allow newlines

\{\{OtherCoversTabber(.*?)\}\}

will find everything starting with end brackets it finds. Replacing it with

will give it the proper gallery tags on both sides and leave all the middle stuff still in the middle.

The other part is both simpler and more of a pain. Simpler because it's relatively easy to tell it to look for the pipe characters and LA and then tell it to get the rest of the line (here . is set to not allow newlines)

\|LA\|\|(.*)

Then replacing it with

$1|Limited Edition A puts it in the form gallery likes. The hassle of this one is that it needs dozens of variants for LB, LC, SV, TA, LEP, SMSE and all the other things that have ended up in EditionLong. But even that amounts to a few boring minutes of copy and paste, not a giant deal in the end.

This also won't catch anything that actually used the option to specify a longer caption, like

|SR|So Rare It's The Only One Like This Edition|itssorare.jpg

But I won't set it to run entirely automatically so hopefully I'll notice anything like that that pops up.

For some reason it's also splitting up the last cover line, even when I explicitly add in more search/replace that should undo it like

200px-L_p0014263253.jpg|Type-A 200px-L_p0014263242.jpg |Type-B

but oh well, one manual character delete necessary per each.

So I got the above going and did a dozen-ish pages. If you're fine with how they're turning out I can continue on.