X-Git-Url: https://git.p6c8.net/selfforum.git/blobdiff_plain/489e7846289d4fb66eb4b9fab0fed4af719b98ee..50d4e173c45376a21561a87e1798a2644d08ebfb:/selfforum-cgi/shared/CheckRFC.pm?ds=sidebyside diff --git a/selfforum-cgi/shared/CheckRFC.pm b/selfforum-cgi/shared/CheckRFC.pm index ddde67f..cb9a616 100644 --- a/selfforum-cgi/shared/CheckRFC.pm +++ b/selfforum-cgi/shared/CheckRFC.pm @@ -99,6 +99,8 @@ sub is_email ($;$) { # remove nested comments 1 while ($string =~ s/\([^()]*\)//g); + #$string =~ s/^\s+//; + #$string =~ s/\s+$//; return ($string =~ /^$email[0]$/) unless $strict; @@ -141,7 +143,7 @@ BEGIN { @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 >;