Andy Lindeman

Support TLDs of up to 7 characters

`isURL` only supports TLDs up to 6 characters long. However, there are
several common TLDs with 7 or more letters: `.example`, `.systems`, etc.
... ... @@ -206,7 +206,7 @@ class GetUtils {
/// Checks if string is URL.
static bool isURL(String s) => hasMatch(s,
r"^((((H|h)(T|t)|(F|f))(T|t)(P|p)((S|s)?))\://)?(www.|[a-zA-Z0-9].)[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,6}(\:[0-9]{1,5})*(/($|[a-zA-Z0-9\.\,\;\?\'\\\+&%\$#\=~_\-]+))*$");
r"^((((H|h)(T|t)|(F|f))(T|t)(P|p)((S|s)?))\://)?(www.|[a-zA-Z0-9].)[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,7}(\:[0-9]{1,5})*(/($|[a-zA-Z0-9\.\,\;\?\'\\\+&%\$#\=~_\-]+))*$");
/// Checks if string is email.
static bool isEmail(String s) => hasMatch(s,
... ...
... ... @@ -213,6 +213,7 @@ void main() {
'http://appliance.example.com/bee/badge',
'http://www.example.org/berry.aspx',
'http://example.org/',
'http://birds.example/',
];
for (final url in urls) {
... ...