I cannot answer to TextPad, but I can tell you how to do it in Sublime Text.
There are two things you need to know in Sublime to accomplish what you are trying to do.
- The "Find" function, including RegEx and "Find in Selection" tools.
- The concept of "Multiple Cursors"
The "Find" tool can be accessed just like in a web browser, by pressing ctrl+f
(Windows)
It will open on the bottom of the screen, and on the left side you will see some buttons. If you hover over the buttons you will see a descriptor. One of them is the RegEx search, and another is the "In Selection" button, among others.
When you search, you don't need to try to search for exactly what you will be editing, you just need to find something that always comes before or after what you want. The reason for this will become clear later, just trust me for now.
So in your case, you probably don't need to use the RegEx search. First, select the entire section that you want to search in, then hit ctrl+f
(Windows), type in something like <td align="center">
, then hit the "In Selection" button. At that point, you should have all the instances of <td align="center">
in your selection highlighted. You could also search for the closing tag of </td>
to get the other end.
At this point, you can just step through the document one at a time, but there is a better way: Multiple Cursors.
Multiple cursors is one of the coolest features of Sublime.
Now that you have highlighted every instance of what you're looking for, pressing alt+enter
(Windows) will give you a cursor at all those places. You can now use the arrow keys to move the cursors to the exact place you want to insert your text. Once you're there, just start typing! You will see your new text show up in all those places!
Sublime Search and Replace:
https://docs.sublimetext.io/guide/usage/search-and-replace.html
Multiple Cursors:
https://docs.sublimetext.io/guide/usage/editing.html#multiple-selections
Sublime keyboard shortcuts:
OSX: https://docs.sublimetext.io/reference/keyboard_shortcuts_osx.html
Windows: https://docs.sublimetext.io/reference/keyboard_shortcuts_win.html