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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login