Search code examples
notepad++

Notepad++ Fill every x Space with a Character in a Single Line


Basically I want to take this: Augustus Sepurcius Bibulus Spurius Calavius Taurinus Titus Nigilius Celatus and turn it into this: "Augustus Sepurcius Bibulus" "Spurius Calavius Taurinus" "Titus Nigilius Celatus"

I'm trying to add a (ton) of generated Roman names to a game I'm playing and I have to enclose each name in quotations to get a longer name free of underscores or hyphens, and adding in each quotation would take a ridiculous amount of time and require patience I don't have.

I'm a super-huge notepad++, coding, programming, etc. noob so any help would be extremely appreciated.


Solution

  • If you want to enclose groups of 3 names in quotes. You can match the three names in a group then replace with the quoted match. Make sure Regular expression is checked in your replace window and replace (Replace All):

    (\w+ \w+ \w+)
    

    with:

    "$1"
    

    $1 is a reference to the first (and in this case unique) matched group.