🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

Regex Search & Highlight

Search and highlight text using regex patterns on any webpage

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

Autor
JimDop
Dziennych instalacji
0
Wszystkich instalacji
0
Oceny
0 0 0
Wersja
1.0
Utworzono
21-11-2025
Zaktualizowano
21-11-2025
Rozmiar
10,8 KB
Licencja
MIT
Dotyczy
Wszystkie strony

I've created a robust Violentmonkey/Tampermonkey userscript with these features:
Key Features:

Regex search with full regex pattern support
Yellow highlighting of all matches
Match counter showing total matches found
Case sensitive toggle option
Whole word search option
Minimizable panel (stays out of your way)
Auto-scrolls to first match
Works on dynamic sites like Reddit and NYTimes (MutationObserver tracks DOM changes)
Smart text node filtering (skips scripts, styles, and the panel itself)

How to use:

Install Violentmonkey extension
Create a new script and paste this code
Visit any website
Enter a regex pattern (e.g., \b[A-Z]{3,}\b for acronyms, \d{3}-\d{3}-\d{4} for phone numbers)
Click "Search & Highlight"

Example patterns to try:

\b\w+@\w+\.\w+\b - Email addresses
https?://[^\s]+ - URLs
\$\d+\.?\d* - Dollar amounts
\b[A-Z][a-z]+\b - Capitalized words

The script handles complex pages by using TreeWalker to efficiently find text nodes and a MutationObserver to re-apply highlights when the page changes dynamically.