# remove nested comments
1 while ($string =~ s/\([^()]*\)//g);
+ #$string =~ s/^\s+//;
+ #$string =~ s/\s+$//;
return ($string =~ /^$email[0]$/) unless $strict;
@email = ();
for $domain (
- qq< $sub_domain (?: $Period $X $sub_domain )+ >,
+ qq< $sub_domain (?: $Period $X $sub_domain )* $Period [A-Za-z][A-Za-z][A-Za-z]?[A-Za-z]? >,
qq< $sub_domain (?: $Period $X $sub_domain )* >
) {
my $route = qq< \@ $X $domain (?: , $X \@ $X $domain )* : $X >;
my $hsegment = "(?:(?:$httpuchar|[;:\@&=~])*)";
my $search = "(?:(?:$httpuchar|[;:\@&=~])*)";
my $hpath = "(?:$hsegment(?:/$hsegment)*)";
- my $httpurl = "(?:http://$hostport(?:/$hpath(?:\\?$search)?)?(?:#$xchar*)?)";
- my $strict_httpurl = "(?:http://$hostport(?:/$hpath(?:\\?$search)?)?)";
+ my $httpurl = "(?:https?://$hostport(?:/$hpath(?:\\?$search)?)?(?:#$xchar*)?)";
+ my $strict_httpurl = "(?:https?://$hostport(?:/$hpath(?:\\?$search)?)?)";
# GOPHER (see also RFC1436)
my $gopher_plus = "(?:$xchar*)";