-
Notifications
You must be signed in to change notification settings - Fork 4
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
Second level domain support #1
Comments
+1 |
I'm still trying to figure ut a pattern to solve this though. Since I don't use regex. |
exists a regex for do that? |
|
Inspiration: https://github.com/peerigon/parse-domain |
Thanks for links. This issue has been open for a year now. I think I'll revisit the logic today (and this week). Try to get a new release with second level domain support :) |
let me if you need help 🙂 |
I'm so slow at github at the moment. :| But, I'm looking into actually create this domain extraction the same as creating a programming language. Create a parser, tokenizer and ast. Not sure how performant that will be, but just for the fun of it. Then it will probably be much easier to extract the second level domain. However, I guess an approach where we just use regex would be faster though. |
Have been investigating SLDs, regex, and such. This is a tricky thing to do. Seems that I actually need a list of SLDs to do this. Will continue investigating. |
Nice place to test regex. This is just a simple test by checking for dots and words: https://regex101.com/r/2Gd219/1 |
One easy approach would be returning |
+1 |
Two years later, a "hack" for second level domain support is added. All tests are passing. |
Nope. Forgot about sub domains. This "hack" didn't work. Reverting. |
+1 !!! |
+1 |
You can check how this package is doing it to validate second-level domains. |
Here is the PR with details: #7 |
https://en.wikipedia.org/wiki/Second-level_domain
*.co.uk
The text was updated successfully, but these errors were encountered: