Skip to content

Wildcard-to-regex conversion in Pattern.convertWildcard generates slow regexes (v8.3) #72

@i-rinat

Description

@i-rinat

Regex generation code in Pattern.convertWildcard() (in version v8.3) does not emit beginning-of-a-line anchor "^" which make pattern matching on sites with long URLs too painful. Manually rewriting all wildcard patterns to regular expression helps, but that defeats the whole purpose of having wildcard patterns. Please add "^".

For example, *://*.example.com/ is currently converted to .*://(.*\.)?example\.com/. It would be nice to have something like ^[^:]+://(.*\.)?example\.com($|/) instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions