Skip to content

api.URLPattern - Firefox changed the regex engine #29092

@eight04

Description

@eight04

What type of issue is this?

Incorrect support data (example: BrowserX says "86" but support was added in "40")

What information was incorrect, unhelpful, or incomplete?

In Firefox<149, URLPattern uses rust regex, therefore some syntax e.g. look-around will throw:
https://bugzilla.mozilla.org/show_bug.cgi?id=1998871

This information is not documented.

What browsers does this problem apply to, if applicable?

Firefox

What did you expect to see?

I think the lack of look-around syntax should be documented, or raise the support version from 142 to 149, that Firefox changed the regex engine for better compatibility: https://bugzilla.mozilla.org/show_bug.cgi?id=1984171

Otherwise, the example code will throw in Firefox<149.

Did you test this? If so, how?

Here is a jsbin for testing: https://jsbin.com/tocafidoqa/3/edit?js,console

You should see

true
false
true
false

in fully supported browsers.

Can you link to any release notes, bugs, pull requests, or MDN pages related to this?

Do you have anything more you want to share?

No response

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/URLPattern

MDN metadata

MDN page report details
  • Query: api.URLPattern
  • Report started: 2026-02-20T15:21:50.902Z

Metadata

Metadata

Assignees

No one assigned

    Labels

    data:apiCompat data for Web APIs. https://developer.mozilla.org/docs/Web/APIinfo neededThis needs more information to review or act on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions