请问用php和正则表达式怎么筛选出网址的前半部分,例如:当前网址为http://zhidao.baidu.com ,筛选出“zhidao”,
当前网址为http://forum.csdn.net ,筛选出“forum”,
谢谢,请高手赐教!!