Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add isValidDomainName method #256

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

geomtech
Copy link
Member

it's based on RFC 1035.
Working on, not ready to merge, want to try to implement regex (without threading)

@geomtech geomtech self-assigned this Nov 14, 2023
@valentinbreiz
Copy link
Member

lmao he is back

return false;
}

string pattern = @"^(?:(?=[a-z0-9-]{1,63}\.)[a-z0-9]+(?:-[a-z0-9]+)*\.)+[a-z]{2,}$";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this does not cover punycode domains https://regex101.com/r/54p0p4/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: To do (no priority)
Development

Successfully merging this pull request may close these issues.

3 participants