PHP实现正则表达式抽取email地址函数

2015-03-03 0 894
PHP实现正则表达式抽取email地址函数
function extract_emails_from($string) {
	//加入对#的判断,这个你懂的^_^ http://blog.ddian.cn
	preg_match_all("/[\._a-zA-Z0-9-]+(@|#)[\._a-zA-Z0-9-]+/i", $string, $matches);
	return $matches[0];
}

遇见资源网 php PHP实现正则表达式抽取email地址函数 http://www.ox520.com/7389.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务