Re: 從URL字串抓取hostname

看板Perl作者 (System hacked)時間16年前 (2009/02/09 14:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
※ 引述《deh3215 ()》之銘言: : my $str="http://www.rhbrands.com/images/mat.php.htm"; : 要取出http://到/中間這段,即www.rhbrands.com http://search.cpan.org/dist/URI/ 做。 use URI; my $u = URI->new($str); print $u->host; -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.113.235.132
文章代碼(AID): #19Zytd_7 (Perl)
討論串 (同標題文章)
文章代碼(AID): #19Zytd_7 (Perl)