<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[numeriweb :: Scripts / Fragments de codes]]></title>
		<description><![CDATA[Sujets du forum Scripts / Fragments de codes]]></description>
		<language><![CDATA[fr]]></language>
		<link><![CDATA[http://numeriweb.lescigales.org/index.php?p=rss&amp;mode=forum&amp;id=52]]></link>
		<lastBuildDate><![CDATA[Sun, 11 May 2008 17:51:33]]></lastBuildDate>
		<generator><![CDATA[FSB 2]]></generator>
		<item>
			<title><![CDATA[[php] regex pour tester l'email]]></title>
			<description><![CDATA[bonjour, voici une expession reguliere qui teste la validitée d'une adresse mail (n'est pas fiable a 100%) par exemple : -moi@orange.fr == bon -moi.fr == pas bon -moiiii == pas bon -moi@cretin.fr == bon <img src="http://numeriweb.lescigales.org/images/smileys/fsb2_mad.gif" /> 
 
voici la regex :<div class="code"><div class="code_title">PHP (<a href="#" onclick="selectCode(this.parentNode.parentNode.getElementsByTagName('PRE')[0]); return false">Sélectionner le code</a>)</div><pre class="code_content">"<span class="sc_php_text">#^&#91;a-z0-9._-&#93;+@&#91;a-z0-9._-&#93;{2,}\.&#91;a-z&#93;{2,4}$#</span>"</pre></div><br/> 
utilisation :<div class="code"><div class="code_title">PHP (<a href="#" onclick="selectCode(this.parentNode.parentNode.getElementsByTagName('PRE')[0]); return false">Sélectionner le code</a>)</div><pre class="code_content">
<span class="sc_php_keyword">if</span> &#40;<a href="http&#58;//www.php.net/manual/function.preg-match.php" class="sc_php_function" target="_blank" title="">preg_match</a>&#40;"<span class="sc_php_text">#^&#91;a-z0-9._-&#93;+@&#91;a-z0-9._-&#93;{2,}\.&#91;a-z&#93;{2,4}$#</span>", <span class="sc_php_var">$email2</span>&#41;&#41;
    {
<span class="sc_php_comment">//bon</span>
}
<span class="sc_php_keyword">else</span> <span class="sc_php_normal">echo</span> '<span class="sc_php_text">votre adresse email n\'est pas bonne</span>';

&lt;<span class="sc_php_normal">br</span>/&gt;

<span class="sc_php_normal">voila</span>!</pre></div>]]></description>
			<author><![CDATA[sheik5757@gmail.com sheik]]></author>
			<link><![CDATA[http://numeriweb.lescigales.org/index.php?p=topic&amp;t_id=10]]></link>
			<pubDate><![CDATA[Sun, 11 May 2008 17:51:33]]></pubDate>
			<guid isPermaLink="false"><![CDATA[http://numeriweb.lescigales.org/index.php?p=topic&amp;t_id=10]]></guid>
		</item>
	</channel>
</rss>