5000+ Great Articles

How to Do Advanced Find Search in Google Chrome

How to Do Advanced Find Search in Google Chrome.

A long time ago, I wrote an article on how to open certain web requests in incognito mode. He used RegEx, which got me thinking, what if you could do the same with Find in Page. For example, while researching an article, I come across research papers that are usually long and extensive. So, if I just want to read the connection between graphene and a lithium-ion battery, I need lines or paragraphs that contain both of those words. But if you do a basic search in Google Chrome and type in “Graphene lithium-ion,” it will search for the exact word and return no results.

So, if I could use regular expressions, I could refine my search to graphene or lithium ion. Moreover, I could search for paragraphs containing these words. It turns out that Google Chrome has its own method, and you also have a couple of extensions that might help. So this is how advanced search in Google Chrome is.

How to advanced search in Google Chrome

If you are not familiar with the Inspect element and HTML code, I would recommend that you skip to this section

1. The original method

The regular Find on Page option does not support regular expressions or search operators. However, the “Inspect Element” search option does support regular expressions, with one caveat. The inspect element search does not search the web page, but instead looks for HTML source. Hence, search results will point to the source code and not the web page. So, you will need to read the contents of the source code.

To do this, right-click and select “Inspect”. Alternatively, you can also press Ctrl + Shift + I (⌘ + Shift + C on Mac) to navigate to Inspect Element.

Then press Ctrl + Shift + F (⌘ + Shift + F on Mac) to go to the advanced search bar. Alternatively, you can also click on the three buttons in the upper right corner and click on “Search”.

To enable regular expression search, click the “. * “.

The search bar now supports search keywords with regular expressions. For example, I’m on this wiki page on electric vehicles. This page presents the entire evolution of electric motors, battery technology, self-driving, and more. But I’m only interested in the relationship between electric vehicles and lithium-ion batteries. So, I need those paragraphs that contain both of these words. So, in the search bar, I enter “electric vehicles. * Lithium-ion “. This will give me search results where the sentence starts with electric vehicles and has at least 1 lithium ion cell per paragraph.

So now, inside the output, if you hover over the result, the source code pops up. And this is the problem I talked about in the first paragraph. In search results, text on a web page is not highlighted, but the source code is highlighted.

Another problem with this method is that the validation element data also contains HTML tags and other CSS attributes. This method is extremely useful if you work a lot with the site’s source code. This comes in very handy when you need to troubleshoot problems in CSS or HTML code.

2. Chrome extension

The easiest way to do advanced searches is by using Chrome extensions. Chrome RegEx Search is an extension that allows you to use regular expression search directly on any web page. All you have to do is download and install the extension, and it is available on every web page. To invoke it, just press Ctrl + Shift + F on any web page and you will have a search for Chrome Regex. The default search bar supports regular expressions and works straight away. However, the extension has case sensitive search enabled by default. You can click on the “i” button and disable it.

Load Chrome Regex Search

Closing words

These are several ways to enable regular expression search in Google Chrome. To help you with regular expressions, here is a website with cheat sheets for all Regex.

Also Read: How to Turn Off Incognito Mode on Windows, Ubuntu, and macOS

Exit mobile version