113

I want to use regular expressions to search a page in Firefox.

Is this possible?

phuclv
  • 30,396
  • 15
  • 136
  • 260
BrunoLM
  • 5,982

5 Answers5

46

Since the other alternatives offered here have been left in the dust of technological change, and rendered incompatible with latest versions, I'll drop the two current compatible addons I found (though I haven't tested them):

  • Regex Search
    Search in HTML or Highlight using Regular Expression (REGEX) and output the results using template, with saving profiles functionality, you need to know 'basic' Regular expression to benefit from this plugin
  • {find+}
    {find+} is a simple Find-in-Page extension hosting a the ability to search a web page or document by regular expression. It has been designed to look and behave much like the CTRL-F function, but extended to provide a feature-rich and robust user experience with the aim of completely replacing the native Find-in-Page tool.
17

Fastest Search [no longer available]

Best text search on page/in tabs - count/regex/match distribution/list/find-as-you-type. Fastest Instant web/history search in URLBar. Best custom search and multi-tab preview in any box or for selected text. Autocopy, dnd link/image.

12

Yet another option matching my needs very well is Regex Find (no long available on Firefox marketplace) which is open sourced. It's simple, though it may not be so polished.

Screenshot

noraj
  • 458
  • 1
  • 5
  • 16
Bohr
  • 544
3

XUL/Migemo (no long available)

This includes 3 features about the find toolbar. First, the dictionary-assisted find. Second, more customizable Find Toolbar. Third, the highlight feature like Safari 3.

noraj
  • 458
  • 1
  • 5
  • 16
harrymc
  • 498,455
1

If you're familiar with vi then one solution is to use the open-sourced Vimium extension which is available for both Firefox, Chrome and Edge. It allows vi-style navigation in common browsers.

The Hacker's Browser. Vimium provides keyboard shortcuts for navigation and control in the spirit of Vim.

It has another popular fork named Vimium C - All by Keyboard with some more features, also available for Firefox, Chrome, Edge

As in vi, the / command is for searching but it's a literal string search by default. You can prepend or append \r to switch to regex search. You can check out Find Mode help for more information.

You can also enable the setting Treat find queries as JavaScript regular expressions to do a regex match by default. In that case prepend or append \R to do a literal match

This may not be suitable if you just want a simple regex search extension, but otherwise it's very useful for non-mouse web browsing. For example the f command is for opening a link in the current tab, so pressing F will allow you to click pretty much anything that's clickable including links like See more... in Facebook. But it doesn't prevent any mouse usage so give it a try

phuclv
  • 30,396
  • 15
  • 136
  • 260