FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » What this means "(\w|-)+@\w"?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
What this means "(\w|-)+@\w"? [message #174784] Thu, 07 July 2011 13:58 Go to previous message
zhang yun is currently offline  zhang yun
Messages: 3
Registered: July 2011
Karma:
Junior Member
Hi,there
I have some problems in regular expression, here is code :
function is_email($e_name)
{
$arr = array("ac","com","net","org","edu","gov","mil","ac\.cn",
"com\.cn","edu\.cn","net\.cn","org\.cn");
$str = implode("|",$arr);
$reg ='/^[0-9a-zA-z](\w|-)+@\w+\.('.$str.')$/';
//echo $reg;
if(preg_match($reg,strtolower($e_name)))
return strtolower($e_name);
else
return false;
}

I don't know the exactly meaning of "(\w|-)+@\w", could you help me
figure out its meaning? I'm new to posix standard.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: upgrade of php & split deprecated = HELP
Next Topic: Re: What is Islam?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 12:41:28 GMT 2024

Total time taken to generate the page: 0.05115 seconds