Ruby: add RegExpPatterns module

This commit is contained in:
Arthur Baars
2022-03-07 16:08:42 +01:00
parent 71e393c6e1
commit 602538d1c1

View File

@@ -59,6 +59,19 @@ module RegExpFlags {
}
}
/**
* Provides regular expression patterns.
*/
module RegExpPatterns {
/**
* Gets a pattern that matches common top-level domain names in lower case.
*/
string commonTLD() {
// according to ranking by http://google.com/search?q=site:.<<TLD>>
result = "(?:com|org|edu|gov|uk|net|io)(?![a-z0-9])"
}
}
/**
* An element containing a regular expression term, that is, either
* a string literal (parsed as a regular expression)