This tutorial explains how to edit every line of text in a text file to add prefix, suffix, find, replace, and remove characters. So instead of manually editing each line of a text file, you can do editing in bulk by selecting the type of changes you want to do. For this, I will use a free software called “Mass String Processor” that makes the process of bulk editing each line of text file very easy. The best part is that you can specify all the changes in one go, and this software will make those changes in each line of the text file. For example, you can select if you want to add a prefix, replace text with some other text, remove lines, etc., together.
Apart from editing text, you will also have a few other options to use. For example, you can remove empty lines, white spaces, remove duplicate lines, convert first letter/last/all letters to upper case, lower case, etc.
There are many text editors that can help you convert text case or add prefix to text, but not all the above options are available in such editors. Therefore, if you have to add prefix/suffix, delete characters, find and replace a text, etc., in every line of a text file together, then this software fits that need.
The recording above will be helpful to check how this software makes it easy to edit text in every line. As you can see, I added prefix text in every single line and also replaced a text with ease using this software. You can also revert changes anytime which is helpful when changes are done accidentally.
How To Edit Every Line of Text to Add Prefix, Suffix, Find, Replace, Remove Characters?
This is a portable software and you can use this link to get its zip archive. Open its interface which is divided into two parts. The left part is used to write text or add a text file (by drag n drop or using right-click menu), edit or preview it. The right part contains all the options that you can set as per your requirements.
Before doing any changes, do note that you can’t resize interface of this software. Also, there is no Word Wrap feature like Notepad. So you won’t be able to see the full content of your text file directly. You need to move blinking cursor to the left or right to view the content. Or else, you can press enter to show a particular sentence in a new line.
When you have done that, take the help of right part of its interface where all the options are available. You can:
- Add prefix/suffix option and add custom text to add in each line of text. Unfortunately, you can’t add both prefix and suffix in same go. If you have to do that, then first to either of them, and then later do the other one.
- Set number of characters to delete from the beginning or end of each line.
- Search for a particular text and add custom text as the replacement of that text.
- Remove all the text on the left or ride side of a particular character.
- Remove a line if it doesn’t contain a specific word. Or, you can remove line if it contains a specific word.
- Convert first/last/all letters of each line to lower case or upper case.
- Remove empty lines.
- Remove whitespaces.
- Keep only numbers and letters and remove everything else.
- Remove duplicate lines, etc.
You can select which options you need and then click Process button to edit text in bulk. The selected options are indicated with Green vertical bar. The editing is done very quickly. If you want, you can also use Revert button to undo the changes.
This software is not an alternative to Notepad++, Notepad or other text editors. But the features provided by this software are rare to find in a particular text editor. This software is surely helpful when you have to add prefix, replace text, delete characters from every line of a text file.