Skip to content

panic: (anonymous): Line 26506:51 Invalid regular expression: re2: Invalid (?=) <lookahead> #16

@xinstein

Description

@xinstein

I'm trying to use pacproxy to convert shadowsocks pac to simple http proxy, but faced this error.

I actually located some ?='s in the shadowsocks generated pac file:
....
Filter.elemhideRegExp = /^([^\/\*\|\@"!]*?)#(\@)?(?:([\w\-]+|\*)((?:\([\w\-]+(?:[$^*]?=[^\(\)"]*)?\))*)|#([^{}]+))$/;
....
var candidates = text.toLowerCase().match(/[^a-z0-9%*][a-z0-9%]{3,}(?=[^a-z0-9%*])/g);
....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions