Expression Régulière: Découper un URL

Author:
<?php
   $url = "http://www.exemple.com";

   morceaux = ereg("^(http://www).([[:alnum:]]+).([[:aln