SilverAge Software

Search and Replace. Edit. Transform.

Use Cases

How do I use Text Workbench to get rid of malicious HTML?scroll to video


Hi hope you can help me. Some of my websites where attacked so i have buy your software.

I am searching and replacing this text : <img height="1" width="1" border="0" src=""> and replacing with just blanc text. But code is 1000 of places on my website but all have a diffrent picture number like *:

<img height="1" width="1" border="0" src="">
<img height="1" width="1" border="0" src="">
<img height="1" width="1" border="0" src="">

Is there anyway i can get workbench find all in one search, instead of me having add every new number 411034.jpg, 411039.jpg , 4110310.jpg and start over every time.

Hope you can help love your software

* - the attacker's IP has been changed in the example.


It is possible. You just have to use regular expressions.

Regular expressions require that all control characters are escaped.
The simplest way to do so is open the multiline editor.

  1. Click Find What button.
  2. Paste <img height="1" width="1" border="0" src=""> in the editor. Make sure no trailing line ends exist.
  3. Select all text.
  4. Click Escape button.
  5. Select all text again if not selected.
  6. Click Formalize Blanks button. This will replace all spaces with \s+ which will match spaces, tabs and newlines.
  7. Now delete 4110310 and type insead: \d+ - this will match any digit until a non-digit character is found.
  8. Click OK to close the editor.
  9. Now check the Regular Expressions box and you are ready to go!

I've created a short video to help you get it done: