{"action":"created","issue":{"url":"https://api.github.com/repos/layershifter/TLDExtract/issues/25","repository_url":"https://api.github.com/repos/layershifter/TLDExtract","labels_url":"https://api.github.com/repos/layershifter/TLDExtract/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/layershifter/TLDExtract/issues/25/comments","events_url":"https://api.github.com/repos/layershifter/TLDExtract/issues/25/events","html_url":"https://github.com/layershifter/TLDExtract/issues/25","id":318036334,"node_id":"MDU6SXNzdWUzMTgwMzYzMzQ=","number":25,"title":"underscore in hostname","user":{"login":"Erwane","id":712604,"node_id":"MDQ6VXNlcjcxMjYwNA==","avatar_url":"https://avatars2.githubusercontent.com/u/712604?v=4","gravatar_id":"","url":"https://api.github.com/users/Erwane","html_url":"https://github.com/Erwane","followers_url":"https://api.github.com/users/Erwane/followers","following_url":"https://api.github.com/users/Erwane/following{/other_user}","gists_url":"https://api.github.com/users/Erwane/gists{/gist_id}","starred_url":"https://api.github.com/users/Erwane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Erwane/subscriptions","organizations_url":"https://api.github.com/users/Erwane/orgs","repos_url":"https://api.github.com/users/Erwane/repos","events_url":"https://api.github.com/users/Erwane/events{/privacy}","received_events_url":"https://api.github.com/users/Erwane/received_events","type":"User","site_admin":false},"labels":[{"id":275117595,"node_id":"MDU6TGFiZWwyNzUxMTc1OTU=","url":"https://api.github.com/repos/layershifter/TLDExtract/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-26T13:44:30Z","updated_at":"2018-06-19T11:49:20Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\ni've found a weird behavior in domain extraction;\r\n\r\n```php\r\n$extract = new Extract();\r\n$result = $extract->parse('dkim._domainkey.phea.fr');\r\nprint_r($result->toArray());\r\n\r\n$result = $extract->parse('dkim.domainkey.phea.fr');\r\nprint_r($result->toArray());\r\n```\r\n\r\n**result**\r\n```\r\nArray\r\n(\r\n    [subdomain] => dkim._domainkey.phea\r\n    [hostname] => fr\r\n    [suffix] => \r\n)\r\nArray\r\n(\r\n    [subdomain] => dkim.domainkey\r\n    [hostname] => phea\r\n    [suffix] => fr\r\n)\r\n```\r\n\r\nthe problem come from `_` character.\r\n\r\nthis regex fix the problem\r\n```php\r\n    const HOSTNAME_PATTERN = '#^((?!-)[a-z0-9_-]{0,62}[a-z0-9]\\.)+[a-z]{2,63}|[xn\\-\\-a-z0-9]]{6,63}$#';\r\n```"},"comment":{"url":"https://api.github.com/repos/layershifter/TLDExtract/issues/comments/398371301","html_url":"https://github.com/layershifter/TLDExtract/issues/25#issuecomment-398371301","issue_url":"https://api.github.com/repos/layershifter/TLDExtract/issues/25","id":398371301,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODM3MTMwMQ==","user":{"login":"Erwane","id":712604,"node_id":"MDQ6VXNlcjcxMjYwNA==","avatar_url":"https://avatars2.githubusercontent.com/u/712604?v=4","gravatar_id":"","url":"https://api.github.com/users/Erwane","html_url":"https://github.com/Erwane","followers_url":"https://api.github.com/users/Erwane/followers","following_url":"https://api.github.com/users/Erwane/following{/other_user}","gists_url":"https://api.github.com/users/Erwane/gists{/gist_id}","starred_url":"https://api.github.com/users/Erwane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Erwane/subscriptions","organizations_url":"https://api.github.com/users/Erwane/orgs","repos_url":"https://api.github.com/users/Erwane/repos","events_url":"https://api.github.com/users/Erwane/events{/privacy}","received_events_url":"https://api.github.com/users/Erwane/received_events","type":"User","site_admin":false},"created_at":"2018-06-19T11:49:20Z","updated_at":"2018-06-19T11:49:20Z","author_association":"NONE","body":"PR #26 "}}
{"actor":{"display_login":"Erwane"}}