看板 [ Perl ]
討論串從URL字串抓取hostname
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者DarkKiller (System hacked)時間16年前 (2009/02/09 14:32), 編輯資訊
0
0
2
內容預覽:
http://search.cpan.org/dist/URI/ 做。. use URI;. my $u = URI->new($str);. print $u->host;. --. 發信站: 批踢踢實業坊(ptt.cc). ◆ From: 140.113.235.132.

推噓1(1推 0噓 1→)留言2則,0人參與, 最新作者deh3215時間16年前 (2009/02/06 20:12), 編輯資訊
0
0
1
內容預覽:
my $str="http://www.rhbrands.com/images/mat.php.htm";. 要取出http://到/中間這段,即www.rhbrands.com. --. 發信站: 批踢踢實業坊(ptt.cc). ◆ From: 140.117.168.75.
首頁
上一頁
1
下一頁
尾頁