Skip to content

Regex enforces FQDN be used #10

@golyalpha

Description

@golyalpha

I just tried using this package to get pathlib SMB support, but apparently the regex (at least as written in the readme - haven't yet checked the source) seems to be enforcing a FQDN be used in the path (at least one .tld needs to be present in the "host" segment of the path)

However, local network shares are often accessed with just the local hostname excluding any tlds (ex: workstation instead of workstation.local), and may not even have a resolvable hostname with a "tld" segment.

Seems the regex could be fixed by changing the last quantifier from {1} (requiring exactly one match) to ? (allowing 0 or 1 matches) for the "tld" capture group.

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