Re: preg_replace question
| From: | 1LT John W. Holmes | Date: | Wed, 20 Nov 2002 22:56:02 +0000 |
| Subject: | Re: preg_replace question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-125346@lists.php.net to get a copy of this message | ||
> thats the thing the urls should be able to parse http:// or www
> or both
and
> i have to unfortunatly clean up a forced port and directory in the url
> aswell for gethostname to work
Well, your original question should of said that and we wouldn't be wasting
time.
preg_match("%\.([^.]+\.[a-z]+)%",$host,$match)
$match[1] would have your name.
---John Holmes...