Skip to content

Unclosed regex pattern at position: 2327651 #142

@zaitebaki

Description

@zaitebaki

I get the error

"Uncaught: Unclosed regex pattern at position: 2327651"

when using the JavaScript code:

let jj = jid.match(/([^/]+)(?:\/(.+))?/);

If I replace the code like this:

const regex = new RegExp("([^/]+)(?:\/(.+))?");
let jj = jid.match(regex);

the error disappears, and everything works as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions