In this article, we will add text to the end of every line in Notepad++. Speeding up your workflow so you can return to the important tasks.
Bring up the Find/Replace dialog. [Ctrl+H]
To add characters to the end of every line in a file.
Find What: $
Copy
Search Site
Search Google

Replace with: ]', RESEED, 0\);
Copy
Search Site
Search Google
Example:
Let's say you have a bunch of SQL Server Tables in your database that need to be RESEEDed.
(This means you want to start the ID Count at 1.)

DBCC CHECKIDENT ('[TableOne]', RESEED, 0);
Copy
Search Site
Search Google

You have TableOne - TableTwenty
In your list, you have.
TableOne
TableTwo
TableThree
TableFour
TableFive
etc...
Hit [Ctrl+H] to open the [Find/Replace] Dialog.
In the [Find what:]$ (This is the dollar sign)
In the [Replace with:]
', RESEED, 0\);
Copy
Search Site
Search Google

(To add a parenthesis to the end, you must add a backslash. As you can see above, we have 0\).
Without the backslash, the Parentheses and Semi-colon (semicolon) would not be added.)
Search Mode: Check [Regular Expression]
Then click on [Replace All]
The output will be this.


TableOne]', RESEED, 0);
TableTwo]', RESEED, 0);
TableThree]', RESEED, 0);
TableFour]', RESEED, 0);
TableFive]', RESEED, 0);
Copy
Search Site
Search Google


Other Articles Related to this Entry.How to add text to the end of every line of a text file using Notepad++«