How to insert text in a new line every 10 lines in Notepad++

- Launch Notepad++ and open the file in which you want to insert the text.
- Go to the Search menu and select Replace....
- In the Find field, enter:
((?:.*\R){10})
\1Inserted text\n
Using the PythonScript plugin
If you need more control or have complex requirements, you can use the PythonScript plugin.
- Go to Plugins > Plugins Admin and find PythonScript.
- Install and restart Notepad++.
- Go to Plugins > PythonScript > Show Console.
- Paste the code at the bottom of the console (for example, using the letters DDDDDDD)
from Npp import editor; [editor.insertText(editor.positionFromLine(line), 'DDDDDDD\n') for line in range(10, editor.getLineCount(), 10)]
Now you can insert text in a new line every 10 lines in Notepad++.