I can't find any good reason for regex in this case.
you can try to split it with explode / stristr / create a function by your
own which goes over the string and check when a @ is catched, something
like:


function GetDomainName ($a)
{

$returnDomain = "";
$beigale = false;
for ($i = 0; $i < strlen($a) && !$beigale; $i++)

if ($a[$i] == '@')
{

for ($z = ($i+1); $z < strlen($a); $z++)
$returnDomain .= $a[$z];
$beigale = true;
}
return $returnDomain;
}



(there is probably a better way to do this - this is just what came up at my
mind right now..)

On 04/06/2008, VamVan <[EMAIL PROTECTED]> wrote:
>
> Hello All,
>
> For example I have these email addressess -
>
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
>
> What would be my PHP function[Regular expression[ to that can give me some
> thing like
>
> yahoo.com
> hotmail.com
> gmail.com
>
> Thanks
>

Reply via email to