<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Gudubeth &#187; regular expression</title>
	<atom:link href="http://www.gudubeth.net/en/tag/regular-expression/feed" rel="self" type="application/rss+xml" />
	<link>http://www.gudubeth.net/en</link>
	<description>A blog about web design and programming - php, actionscript, javascript, java, css</description>
	<lastBuildDate>Tue, 27 Apr 2010 19:08:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Email verification with PHP</title>
		<link>http://www.gudubeth.net/en/articles/email-verification-with-php</link>
		<comments>http://www.gudubeth.net/en/articles/email-verification-with-php#comments</comments>
		<pubDate>Tue, 19 Jan 2010 19:01:59 +0000</pubDate>
		<dc:creator>Gudubeth</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[regular expression]]></category>

		<guid isPermaLink="false">http://www.gudubeth.net/en/?p=74</guid>
		<description><![CDATA[There are so many email verification functions written with PHP. But how many of them work perfect? In the search of perfect email verification with regular expression, the site fightingforalostcause.net has tested 13 of them and published the results at this page: Comparing E-mail Address Validating Regular Expressions. He found that Geert De Deckere from [...]


Related posts:<ol><li><a href='http://www.gudubeth.net/en/articles/remove-directory-with-php' rel='bookmark' title='Permanent Link: Remove a Directory and Its Content with PHP'>Remove a Directory and Its Content with PHP</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>There are so many email verification functions written with PHP. But how many of them work perfect? In the search of perfect email verification with regular expression, the site fightingforalostcause.net has tested 13 of them and published the results at this page: <a href="http://fightingforalostcause.net/misc/2006/compare-email-regex.php" target="_blank">Comparing E-mail Address Validating Regular Expressions</a>. He found that Geert De Deckere from the <a href="http://kohanaphp.com/">Kohana project</a> has the best one. Details are at the page above and here is the email verification function made of this regex.</p>
<pre>
/**
 *
 * @param <type> $email
 * @return bool true if email is valid
 */
function validateEmail($email){
	return (bool) preg_match('/^[-_a-z0-9\'+*$^&#038;%=~!?{}]++(?:\.[-_a-z0-9\'+*$^&#038;%=~!?{}]+)*+@(?:(?![-.])[-a-z0-9.]+(?&lt;![-.])\.[a-z]{2,6}|\d{1,3}(?:\.\d{1,3}){3})(?::\d++)?$/iD', $email);
}
</pre>


<p>Related posts:<ol><li><a href='http://www.gudubeth.net/en/articles/remove-directory-with-php' rel='bookmark' title='Permanent Link: Remove a Directory and Its Content with PHP'>Remove a Directory and Its Content with PHP</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.gudubeth.net/en/articles/email-verification-with-php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
