URL Patterns

A URL Pattern tells Tapicker which page, iframe, or request URL to match. Start with a URL you want to recognize, then replace the parts that can change. For example, you can match one login page, every product page, or a group of API requests.

Use URL Patterns in Tapicker

You can use a URL Pattern in these settings:

  • Target Element > Subframe — identify the iframe containing an element. Leave it empty to use the main page. See Target Element.
  • Wait Until — wait for the current page URL to match your pattern. See Wait Until.
  • HTTP Monitor — select the request URLs to monitor. See HTTP Monitor.

Choose the URL for the setting you are configuring. An iframe's URL or an API request's URL can differ from the address shown in the browser's address bar.

Start with a Full URL

To match a page, start with its complete address:

https://example.com/products/42

This matches the /products/42 path on https://example.com. It does not match /products/87 or the same path on another hostname.

If you omit the query string, such as ?source=email, or the fragment, such as #details, those parts can vary without preventing a match. For example, the pattern above also matches https://example.com/products/42?source=email#details.

Tapicker uses the browser's URLPattern API. Enter an absolute pattern with a protocol and hostname, such as https://example.com/.... A relative pattern like /products/42 does not work because Tapicker does not supply a base URL.

Enter the pattern directly, without surrounding quotes. It is not a regular expression, so do not wrap the whole pattern in slashes or add ^ and $ around it.

Match Changing Paths

Match One Path Segment

Suppose product pages have different IDs:

https://example.com/products/42
https://example.com/products/87

Replace the ID with a named placeholder:

https://example.com/products/:id

:id matches one non-empty path segment. It matches 42 or 87, but not an empty value or 42/reviews.

The name is a label within the pattern. You do not need to define a variable named id, and using it does not create a Workflow variable. Choose descriptive names when they help you read the pattern, such as :productId or :orderId.

For two changing segments, use two placeholders:

https://example.com/blog/:year/:slug

Match the Rest of a Path

Use * when the changing part may contain several path segments:

https://example.com/products/*

This matches https://example.com/products/42, https://example.com/products/42/reviews, and https://example.com/products/.

The wildcard can match an empty String, but the slash before it is still required. The pattern does not match https://example.com/products.

Use :id when you need one segment; use * when you want to allow the rest of the path. Keep fixed text such as /products/ to avoid matching unrelated pages.

Keep Case and Trailing Slashes in Mind

Fixed path text is case-sensitive: /products/42 and /Products/42 are different paths. A trailing slash also matters: /products and /products/ are different.

A wildcard does not change the spelling or separators around it. If a pattern does not match, check those fixed parts first.

Match Hostnames

The protocol and hostname are part of the match. For example, https://example.com/* matches pages on that HTTPS host, but not http://example.com/about or https://shop.example.com/about.

To allow changing subdomains, use a wildcard:

https://*.example.com/*

This matches https://shop.example.com/products/42 and https://www.example.com/help. It also allows multiple subdomain levels, such as https://support.eu.example.com/help.

It does not match https://example.com/products/42: the dot before example.com is still required. Use https://example.com/* when you mean the host without a subdomain.

Match Query Strings

The query string is the part after ? in a URL. It often contains parameters such as q=shoes&page=2.

Ignore Parameters You Do Not Need

Leave the query string out when it should not affect matching:

https://example.com/search

This matches both https://example.com/search?q=shoes and https://example.com/search?q=books&page=2, as well as the URL without a query string.

Match an Exact Query String

To specify a query string, write \? between the path and the parameters:

https://example.com/search\?q=shoes

Enter one backslash before ? in Tapicker. It tells URLPattern to treat the question mark as the query separator rather than an optional-pattern marker. The URL being matched still contains an ordinary ?, with no backslash.

This matches https://example.com/search?q=shoes. It does not match https://example.com/search?q=books, a query with extra parameters, or the same page without a query string.

Allow a Query Value to Change

Use a wildcard for the changing part:

https://example.com/search\?q=*

This matches https://example.com/search?q=shoes and https://example.com/search?q=books&page=2. It also matches https://example.com/search?q= because * can be empty.

The wildcard is not limited to one parameter value: it can consume the rest of the query, including &page=2.

Keep Parameter Order in Mind

URLPattern matches the query as text; it does not rearrange parameters or compare them as a set.

For the pattern https://example.com/search\?q=*:

  • https://example.com/search?q=books&page=2 matches.
  • https://example.com/search?page=2&q=books does not match.

If parameter order varies, leaving the query out is often the simplest choice when the path alone identifies the URL you need. Keep a query requirement only when it is necessary for your task.

Make a Path Segment Optional

After a placeholder, ? makes that segment optional:

https://example.com/products/:id?

This matches both https://example.com/products and https://example.com/products/42. It still does not match https://example.com/products/42/reviews.

Here, ? modifies :id; it does not begin a query string. Use \? when you want to introduce query parameters, as in the examples above. See the URLPattern escaping guide for more about this distinction.

Examples to Copy

Replace example.com with the real website's hostname. Each example shows a complete pattern you can enter in Tapicker, followed by URLs it does and does not match.

Basic Page Matches

Match One Page Path

https://example.com/login

Matches

  • https://example.com/login
  • https://example.com/login?next=/account

Does not match

  • https://example.com/login/
  • https://example.com/login/help

Match Any Page on One Host

https://example.com/*

Matches

  • https://example.com/
  • https://example.com/about
  • https://example.com/products/42

Does not match

  • https://shop.example.com/about
  • http://example.com/about

Match Pages Below a Section

https://example.com/help/*

Matches

  • https://example.com/help/
  • https://example.com/help/article
  • https://example.com/help/account/reset

Does not match

  • https://example.com/help
  • https://example.com/Help/article

Changing Paths

Match One Product ID

https://example.com/products/:id

Matches

  • https://example.com/products/42
  • https://example.com/products/abc
  • https://example.com/products/42?source=email

Does not match

  • https://example.com/products/
  • https://example.com/products/42/reviews

Match a Product and Its Nested Pages

https://example.com/products/*

Matches

  • https://example.com/products/
  • https://example.com/products/42
  • https://example.com/products/42/reviews

Does not match

  • https://example.com/products
  • https://example.com/Products/42

Match Two Changing Path Segments

https://example.com/blog/:year/:slug

Matches

  • https://example.com/blog/2026/my-post
  • https://example.com/blog/2025/getting-started

Does not match

  • https://example.com/blog/2026
  • https://example.com/blog/2026/my-post/comments

Match an Order Receipt

https://example.com/orders/:orderId/receipt

Matches

  • https://example.com/orders/123/receipt
  • https://example.com/orders/abc/receipt?download=1

Does not match

  • https://example.com/orders/123/items
  • https://example.com/orders/123/receipt/

Hostnames and Requests

Match Pages on Subdomains

https://*.example.com/*

Matches

  • https://shop.example.com/products/42
  • https://www.example.com/help/

Does not match

  • https://example.com/products/42
  • https://shop.example.org/products/42

Match JPG Files on Changing CDN Hosts

https://cdn-*.example.com/*.jpg

Matches

  • https://cdn-1.example.com/images/hero.jpg
  • https://cdn-us.example.com/assets/banner.jpg?width=800

Does not match

  • https://cdn-1.example.com/images/hero.png
  • https://cdn.example.com/images/hero.jpg

Match Requests Under an API Path

https://api.example.com/v1/orders/*

Matches

  • https://api.example.com/v1/orders/
  • https://api.example.com/v1/orders/123
  • https://api.example.com/v1/orders/123/items

Does not match

  • https://api.example.com/v1/orders
  • https://api.example.com/v2/orders/123
  • https://api.example.com/v1/users/123

Query Strings

Match One Search Term

https://example.com/search\?q=shoes

Matches

  • https://example.com/search?q=shoes
  • https://example.com/search?q=shoes#results

Does not match

  • https://example.com/search?q=books
  • https://example.com/search?q=shoes&page=2
  • https://example.com/search

Match a Changing Search Term

https://example.com/search\?q=*

Matches

  • https://example.com/search?q=shoes
  • https://example.com/search?q=books&page=2
  • https://example.com/search?q=

Does not match

  • https://example.com/search?page=2&q=books
  • https://example.com/search?query=books
  • https://example.com/search

FAQ

Why Does My Pattern Not Match the URL?

Compare it with the actual URL in this order:

  1. Check the protocol and hostname, including subdomains and any non-default port.
  2. Check the fixed path, including capitalization and trailing slashes.
  3. Check how many path segments can change. :id covers one non-empty segment; * can cover several segments or be empty.
  4. If you specified a query string, check the \? separator, parameter order, and any extra parameters.
  5. Check that you are using the right URL: the current page for Wait Until, the iframe for Subframe, or the request for HTTP Monitor.

A pattern using the default HTTPS port does not match a URL on a different port, such as https://example.com:8443/.

Why Does My Pattern Match URLs with Extra Parameters?

If you leave out the query string, URLPattern allows any query. If you use * in the query, it can include more parameters after the changing value. Use a complete query pattern when the whole query must match.

Does :id Save the Matched Value as a Variable?

No. A named placeholder controls which URLs match. Tapicker does not automatically save that part of the URL under $vars.

Why Does an Iframe Match When Its Address Has Changed?

For Target Element iframe matching, Tapicker first checks the URL Pattern. If no iframe matches, it may fall back to URLs with the same origin, number of path segments, and query parameter names, even when their values differ.

This iframe fallback is separate from URLPattern matching. It does not apply to Wait Until or HTTP Monitor. Use a deliberate pattern to describe the URL changes you expect.

What Happens If the Pattern Is Invalid?

Wait Until and HTTP Monitor report an error when their URL Pattern cannot be parsed. Check that the pattern is absolute and that placeholders and special characters are written correctly.

A normal URL and a URL Pattern can look similar, but characters such as :, *, and ? have pattern meanings. Refer to the URLPattern constructor guide when matching URLs containing special characters.

Further Reading