[ create a new paste ] login | about

Link: http://codepad.org/FTNikw8g    [ raw code | output | fork ]

PHP, pasted on Jan 26:
1
2
3
4
<?php

$url = "http://www.yelp.com/biz/my-business-name";
echo preg_replace('~^www.~', '', parse_url($url, PHP_URL_HOST));


Output:
1
yelp.com


Create a new paste based on this one


Comments: