<commit_before>package isdomain

import "regexp"

// DomainRegexpStr is a regular expression string to validate domains.
const DomainRegexpStr = "^([a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{2,}$"

var domainRegexp *regexp.Regexp

func init() {<commit_msg>Use more comprehensive hostname regex pattern Fix<commit_after>package isdomain

import "regexp"

// DomainRegexpStr is a regular expression string to validate domains.
const DomainRegexpStr = "^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])(\\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9]))*$"

var domainRegexp *regexp.Regexp

func init() {
{'fraction_non_alphanumeric': 0.20689655172413793, 'fraction_numerical': 0.04433497536945813, 'mean_word_length': 4.495495495495495, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4170143', 'n_tokens_mistral': 270, 'n_tokens_neox': 252, 'n_words': 48}