browser - How do you search for a phrase on a page in Chrome? (Not a string match)

07
2014-07
  • user2344177

    I'm using Chrome on a Mac, and want to be able to easily search for a phrase on a page, not an exact string match.

    For instance, on this page:

    https://developer.mozilla.org/en-US/docs/Web/Reference/Events

    If I hit command+F (or ctrl+F) and enter load

    it shows me 63 instances on the page where load appears.

    But I just want to find instances where the phrase load appears (which would exclude the words loading or download).

    When searching for "load" it looks for an exact string match which includes the quotes.

    When adding -loading, it also looks for an exact string match.

    When I Google search for various combinations of "advanced search find in page chrome browser" I get way too many results and it's hard to research.

  • Answers
  • shub

    RegEx Search lets you search for things inside a web page using regular expressions. If you're new to regular expressions (as I am) then look here. You can easily find what you're looking for quickly.

    To find (as in your example), a single phrase, such as load then, all you need to type is \bload\b.

    If you separate this, you get \b and load and \b.

    \b is an anchor. It is true at a word boundary. More info here (same website as above, different page). Simply put, you use this for seperate words.

    Here is this example working in the website in your question:

    enter image description here.

    RegEx can be very powerful, so this is using the extension as a very low-use. If you ever need, you can use this for things like wildcards etc. (which by default Chrome does not provide)

  • Jason Aller

    One way to filter down is to search for "load" that is a space followed by the word followed by another space. This will unfortunately not handle cases where the word is next to punctuation, but it will find only instances of "load" and not "loading" for example.


  • Related Question

    firefox - Keeping the in-browser search box active in Google Chrome
  • warren

    In Firefox, if I press /, I can get the in-browser (on-the-same-page) search box to pop up at the bottom temporarily (it will time-out after some short period).

    quick find in firefox

    However, if I press Ctrl-F, it will stay up, and if I click to a new page, it will re-perform the on-page search, updating the count of found instances.

    normal firefox find

    In Google Chrome, pressing Ctrl-F yields the on-page search box for that page only, and as soon as a link is clicked, it disappears.

    chrome search box

    I know that on the next page I can just press Ctrl-G (or F3 to 'Find Next', but would like to find a way to mimic Firefox's functionality in this aspect.

    Is this possible, and if so, how?


  • Related Answers
  • 8088

    Best thing that I have been able to find (in my short search) is chrome-type-ahead.

    Type-ahead-find (or find as you type) is an extremely useful accessibility feature (a core functionality in major browsers like Firefox or Safari), but it's not implemented in Chrome (nor planned to be). So -unless Chromium developers come to their senses- we will have to resign ourselves to use an extension.