Bug 466532

Summary: Greasemonkey match does not support regex (invalid)
Product: [Applications] Falkon Reporter: Schimon Jehudah <sch>
Component: extensionsAssignee: David Rosca <nowrep>
Status: RESOLVED NOT A BUG    
Severity: normal CC: jurajoravec
Priority: NOR    
Version First Reported In: 22.12.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Schimon Jehudah 2023-02-27 15:16:07 UTC
The following match rules work with the Greasemonkey web extension but not with Greasemonkey for Falkon.
// @match       *://SOMESITE.(co.uk|com|de|fr|it)/*
// @match       *://*.SOMESITE.(co.uk|com|de|fr|it)/*

Of course, the include metablock does it successfully and more simply with:
// @include     *://SOMESITE.*/*
// @include     *://*.SOMESITE.*/*
Comment 1 Juraj 2024-10-10 18:59:23 UTC
Hello,

The @match meta-thing is handled by QtWebEngine script module.

The QWebEngineScript follows the GreaseMonkey specification which follows Google Chrome specification.
There is not a mention of regex support in the @match attribute.

Based on the links for:
Qt documentation
https://doc.qt.io/qt-6/qwebenginescript.html#details
Greasemonkey wiki (linked from above):
https://wiki.greasespot.net/Metadata_Block#@match
Google Chrome documentation for developers (linked from above):
https://developer.chrome.com/docs/extensions/develop/concepts/match-patterns
Comment 2 Schimon Jehudah 2024-10-11 13:41:22 UTC
I much appreciate your explanation and elaborated respond!