<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Regular Expression]]></title><description><![CDATA[<p dir="auto">Buongiorno ho un problemino<br />
estraggo dal mio database in locale una serie di email che per finale hanno &amp;code ed un hash md5<br />
attaverso una espressione regolare volevo togliere tutto quello che c'e' dopo l'email ma con la funzione preg_matches_all mi esce array ma non l'email questo è il codice che ho fatto</p>
<pre><code>$regex ="/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+ ([a-zA-Z0-9\._-]+)+$/";
$con = mysql_connect($db_host, $db_user, $db_pass) or die("MySQL Error: " . mysql_error());
$db = mysql_select_db($db_name) or die("MySQL Error: " . mysql_error());
$query = mysql_query("SELECT * FROM bounced_mail ")or die ("errore".mysql_error);
while($row = mysql_fetch_array($query)){
   $row['email'];
   preg_match_all($regex,$row['email'],$matches);
    echo($matches[0]."&lt;br /&gt;");
}
</code></pre>
<p dir="auto">Dove sbaglio?</p>
]]></description><link>https://dev.connect.gt/topic/111001/regular-expression</link><generator>RSS for Node</generator><lastBuildDate>Wed, 25 Nov 2026 14:48:14 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/111001.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 24 Sep 2009 10:46:45 GMT</pubDate><ttl>60</ttl></channel></rss>