I am moderator on a site with lots of structured content and regularly edit posts for poor formatting (in particular Markdown and LaTeX). Many of those tasks are tedious and could easily be performed by a search & replace function which, sadly, my browser of choice Firefox lacks.
I could not find a suitable plugin (although I admittedly did not check all >900 results) which is surprising; this seems to easy and useful a feature to not have a plugin!
Copying posts into a text editor is a nice workaround in some cases, but not in all. Some text editors don't have search ^ replace (e.g. gedit, default editor for many GTK based Linux distributions), and I might not be able to install one on every machine I use SE on (university, friends, ...).
Is there a way to bring search & replace to Firefox, preferably with regexp support?
My OS is GNU/Linux, more specifically Ubuntu.
63 Answers
You can use FoxReplace which should do what you want.
This extension allows you to replace text fragments (strings) in a page by other text fragments. The system is based on substitutions, where each substitution has an input text which has to be replaced (the "Replace" field) and an output text by which the first has to be replaced (the "With" field). When a substitution is applied it's over the whole content of a page (you can't do partial substitutions at the moment). Substitutions can be case-sensitive or insensitive. The use of regular expressions is also supported.
You can also use Search and Replace for Firefox, which closely resembles the typical "Search & Replace" function in editors:
A simple addon that enables you to find and replace text on the webpage you are currently on. To access the replace form either use your right click context menu or the keyboard shortcut shift + R. You can either replace one instance or all instances of a text phrase. […]
FoxReplace, on the other hand, is a full-fledged filter that you can also apply to automatically process URL-specific replace rules on page load. Including translating UI elements that are not translated server-side. It also works for simple Search & Replace, but might be a bit overkill.
However, it seems neither Search and Replace for Firefox nor FoxReplace are capable of regexp search and replace …
1For full Regular Expression support and advanced substitution patterns (e.g. $1, $2, &$) you might want to check out this Chrome find & replace extension:
1