adding new line with text at the bottom of every opened files in notepad++?
I want to add text at the bottom of every opened file (as a extra line) in notepad++
Menu "Search" > "Replace" (or Ctrl + H)
Set "Find what" to
(.*+)
- This regular expression selects the whole file, when "matches newline" is enabled.Set "Replace with" to
\1\r\n**"text do not sin friend"**
Enable "Regular expression" and "matches newline"
Click "Replace All"
Notes:
The above assumes a file with Windows EOLs
\r\n
Use
\n
instead of\r\n
for Unix/OS X EOLs-
Use
\r
instead of\r\n
for Mac OS (up to version 9) EOLs
Before:
"text hello friend"
"text hello friend"
After:
"text hello friend"
"text hello friend"
**"text do not sin friend"**
Further reading
- How to use regular expressions in Notepad++ (tutorial)
- Notepad++: A guide to using regular expressions and extended search mode
- Regular Expressions Tutorial
- RegExr: Learn, Build, & Test RegEx
- regex101: Online regex tester and debugger
- RegExper: Regular Expression Visualiser
Related videos on Youtube
Abd
Updated on September 18, 2022Comments
-
Abd almost 2 years
I want to add text at the bottom of every opened file (as a extra line) in notepad++. I know how to add at beginning of the file.
Find what:- (?s).* Replace with:- YOUR TEXT\r\n$0
which helps me more. but don't know how to add (new line with text) at the bottom.
"text hello friend" "text hello friend"
should be changed with new line added at the bottom. like
"text hello friend" "text hello friend" **"text do not sin friend"**
Note "text do not sin friend" need to be added as new line in multiple files.
How can I do this?
-
Abd over 7 yearsit works. you are great. !!!!!!!!!---- thank you so much---!!!!!!!!!.