Welcome to the
WalkMe Help Center
Please log in to continue
Please log in to continue
Match patterns let you specify groups of URLs that a browser extension should apply to. Each match pattern matches a specific set of URLs.
All match patterns are specified as strings and consist of three parts: scheme, host, and path. The scheme and host are separated by ://.
<scheme>://<host><path>
The scheme can be either http or https.
The host component takes one of three forms:
The path must begin with /. After that, it can contain any combination of the * wildcard and any characters allowed in URL paths or query strings. Unlike the host, the path can contain the * wildcard in the middle or at the end, and wildcards may appear more than once.
The path matches against the URL path plus the URL query string, including the ? between them if a query string is present.
For example, to match URLs on any domain where the path ends with foo.bar, use an array of match patterns like ['*://*/*foo.bar', '*://*/*foo.bar?*']. The ?* anchors the ending * to the query string rather than the URL path.
| Pattern | Example matches | Example non-matches |
|
https://*/path Match HTTPS URLs on any host, whose path is "path". |
https://mozilla.org/path https://a.mozilla.org/path https://something.com/path |
http://mozilla.org/path (unmatched scheme)https://mozilla.org/path/ (unmatched path)https://mozilla.org/a (unmatched path)https://mozilla.org/ (unmatched path)https://mozilla.org/path?foo=1 (unmatched path due to URL query string) |
|
https://*/path/ Match HTTPS URLs on any host, whose path is "path/" and which has no URL query string. |
https://mozilla.org/path/ https://a.mozilla.org/path/ https://something.com/path/ |
http://mozilla.org/path/ (unmatched scheme)https://mozilla.org/path (unmatched path)https://mozilla.org/a (unmatched path)https://mozilla.org/ (unmatched path)https://mozilla.org/path/?foo=1 (unmatched path due to URL query string) |
|
https://mozilla.org/* Match HTTPS URLs only at "mozilla.org", with any URL path and URL query string. |
https://mozilla.org/ https://mozilla.org/path https://mozilla.org/another https://mozilla.org/path/to/doc https://mozilla.org/path/to/doc?foo=1 |
http://mozilla.org/path (unmatched scheme)https://mozilla.com/path (unmatched host) |
|
https://mozilla.org/a/b/c/ Match only this URL, or this URL with any URL fragment. |
https://mozilla.org/a/b/c/ https://mozilla.org/a/b/c/#section1 |
Anything else. |
|
https://mozilla.org/*/b/*/ Match HTTPS URLs hosted on "mozilla.org", whose path contains a component "b" somewhere in the middle. Will match URLs with query strings, if the string ends in a /. |
https://mozilla.org/a/b/c/ https://mozilla.org/d/b/f/ https://mozilla.org/a/b/c/d/ https://mozilla.org/a/b/c/d/#section1 https://mozilla.org/a/b/c/d/?foo=/ https://mozilla.org/a?foo=21314&bar=/b/&extra=c/ |
https://mozilla.org/b/*/ (unmatched path)https://mozilla.org/a/b/ (unmatched path)https://mozilla.org/a/b/c/d/?foo=bar (unmatched path due to URL query string) |
WalkMe lets you configure extensions using either URL match pattern or Regex. Here's how they compare.
URL match pattern is built specifically for browser extensions. It uses a simple syntax with wildcard characters to define which URLs an extension should apply to — for example, content scripts or background scripts.
Regex (regular expression) is a powerful, general-purpose tool for pattern matching within strings. It lets you search, extract, or replace text using a combination of characters and metacharacters. It's widely used in text processing, data validation, and programming.
Purpose URL match pattern is created and optimized for web browsers to define which URLs a browser extension should apply to.
Regex is a powerful tool for pattern matching in strings, using a combination of characters and metacharacters.
Usage URL match pattern is used by browser extensions to specify which web pages they should operate on.
Regex can be used across a wide range of applications, like text processing, data validation, and search and replace operations.
Syntax URL match pattern uses wildcard characters like * and ? to specify URL patterns. Regex uses metacharacters like . (any character), * (zero or more occurrences), and + (one or more occurrences).
Example URL match pattern: https://example.com/* matches any URL starting with https://example.com/. Regex: ^(http|https)://example\.com(?:/[^/?#]+)*$ matches URLs belonging to example.com.
URL match pattern — pros
URL match pattern — cons
Regex — pros
Regex — cons
WalkMe recommends using URL match pattern for extension configuration whenever possible. Regex should be a last resort for edge cases. URL match pattern guarantees seamless extension functionality, minimizes behind-the-scenes rules validation, and provides a better experience overall.
URL match pattern is the default for any new system configuration in the admin extension settings.