Skip to content

Failed to construct 'URLPattern': pathname is invalid #31072

@marvinhagemeister

Description

@marvinhagemeister

This worked in Deno 2.5.4, but not in Deno canary anymore. It works in Chrome too.

new URLPattern({ pathname: "/install(\.sh|\.ps1)" })

Output:

Uncaught TypeError: Failed to construct 'URLPattern': pathname is invalid; Invalid regular expression: /(?u)^/install(.sh|.ps1)$/u: Invalid group
    at new URLPattern (ext:deno_url/01_urlpattern.js:202:15)
    at <anonymous>:1:22

Version: Deno 2.5.4+41e70e5

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions