{"id":15503102,"url":"https://github.com/johno/domain-regex","last_synced_at":"2025-04-22T23:21:30.641Z","repository":{"id":24600328,"uuid":"28008823","full_name":"johno/domain-regex","owner":"johno","description":"A regular expression for most valid domains (including the latest TLDs)","archived":false,"fork":false,"pushed_at":"2015-01-27T07:14:55.000Z","size":156,"stargazers_count":39,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-21T06:57:11.253Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johno.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-14T21:32:22.000Z","updated_at":"2024-10-29T12:46:33.000Z","dependencies_parsed_at":"2022-08-26T13:41:14.134Z","dependency_job_id":null,"html_url":"https://github.com/johno/domain-regex","commit_stats":null,"previous_names":["johnotander/domain-regex"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Fdomain-regex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Fdomain-regex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Fdomain-regex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Fdomain-regex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johno","download_url":"https://codeload.github.com/johno/domain-regex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250338492,"owners_count":21414196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T09:12:11.716Z","updated_at":"2025-04-22T23:21:30.624Z","avatar_url":"https://github.com/johno.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Domain Regex\n\n[![Build Status](https://travis-ci.org/johnotander/domain-regex.svg?branch=master)](https://travis-ci.org/johnotander/domain-regex)\n\nA regular expression for matching valid domain names. This regex seeks to support all\ndomains with TLDs listed on\n[publicsuffix.org](https://publicsuffix.org/list/effective_tld_names.dat) including\n[IDNs](http://en.wikipedia.org/wiki/Internationalized_domain_name).\n\nIn the near future this will be likely moved to \u003chttps://github.com/regexps\u003e.\n\n## Installation\n\n```\nnpm i --save domain-regex\n```\n\n## Usage\n\n```javascript\nvar domain = require('domain-regex');\n\ndomain().test('example.aerodrome.aero') // =\u003e true\ndomain().test('a.sub.domain.org')       // =\u003e true\ndomain().test('invalid_domain')         // =\u003e false\n```\n\n### IDN Support\n\nThis regex requires any Unicode character to be converted to its ASCII equivalent. This can be done\nwith a library like [punycode.js](https://github.com/bestiejs/punycode.js).\n\n```javascript\nvar domainRegex = require('domain-regex');\nvar punyCode = require('punycode');\n\ndomainRegex().test(punycode.toASCII('岡山.jp')) // =\u003e true\n```\n\n## Acknowledgements\n\n* Regex adapted from \u003chttps://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9781449327453/ch08s15.html\u003e.\n\n## License\n\nMIT\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\nCrafted with \u003c3 by [John Otander](http://johnotander.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohno%2Fdomain-regex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohno%2Fdomain-regex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohno%2Fdomain-regex/lists"}