正则表达式判断email和URL

body onload=f.a.select();?phpecho a:.htmlspecialchars($a);echo bra1:;$a1 = eregi_replace((^[_.][:alnum:]-]+@([[:alnum:]][[:alnum:]-]*.)+[[:alpha:]]{2,3}$), a href=mailto:/1/1/a , $a) ;echo htmlspecialchars($a1);echo bra1:$a1;echo bra2:;$a2 = eregi_replace(([[:alnum:]]+://([[:alnum:]][[:alnum:]-]*/.)+[[:alpha:]]{2,3}([#/?///][^#/?///][:space:]][^[:space:]]*)?), a href=/1 target=_blank/1/a, $a);echo htmlspecialchars($a2);echo bra2:$a2;// eregi(^[_.][:alnum:]-]+@([[:alnum:]][[:alnum:]-]*/.)+[[:alpha:]]{2,3}$,$a) or die(not a email);?form name=finput name=a value=?php echo $a; ?input type=submit /form/body

发表评论

电子邮件地址不会被公开。 必填项已用*标注