Copy each line of text to 2nd line and add text before and after
-
Here’s what I need to do. I have a text file with a list of filenames.
example:
3wonders.zip
40love.zip
4dwarrio.zipI need to copy each line to a second line and then add text before and after each line.
example:
mame[“3wonders.zip”].core=mame0139
mame[“3wonders.zip”].emulator=libretro
mame[“40love.zip”].core=mame0139
mame[“40love.zip”].emulator=libretro
mame[“4dwarrio.zip”].core=mame0139
mame[“4dwarrio.zip”].emulator=libretroI’ve found the commands to add the text before and after a single line but I’m lost on if there’s a better way to do this than having to add and edit line by line for the for line of the text file name that was copied from the original line.
-
Find:
(?-s)^(.+)$
Replace:mame["$0"].core=mame0139\r\nmame["$0"].emulator=libretro
Search mode: Regular expressionLearn more about how to do this kind of thing yourself, HERE.
-
@Alan-Kilborn Thank you so much! I was searching for that kind of information but I’m pretty new to using Notepad++ and had no idea of what terms, etc. I was looking for. Thank you for the very useful information.