Skip to content

Erroneous RegEx pattern in URLUtil #358

Open

Description

@winfriedgerlach

URNUtil uses this pattern: ^file:///\\p{Alpha}|.*$
Judging from TestURLUtil, this is supposed to detect prefixes like file:///C|. The problem is, that the pattern always matches, because | is a special RegEx character for "alternation" - and every string ends with .*.

So the backslash should probably be escaped. I'll provide a PR with a unit test that shows the issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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