0
如何讀取在Perl中使用正則表達式分成兩行的URL?如何讀取由新行分隔的正則表達式
[REQ-URL]: http://hostname:8080/guiderest?
customerId=cisco&code=news&guide=MostPopular&attrFilter=BlogFlag:true&v=1
如何讀取在Perl中使用正則表達式分成兩行的URL?如何讀取由新行分隔的正則表達式
[REQ-URL]: http://hostname:8080/guiderest?
customerId=cisco&code=news&guide=MostPopular&attrFilter=BlogFlag:true&v=1
my ($url) = $text =~ /(http [\S\r\n]+)/x;
$url =~ tr|\r\n||d;
感謝的快速反應。然而,這個正則表達式似乎不起作用。 – skyrocker
那是對的..它和上面有相同的文字。 – skyrocker
'(my $ url = $ text)=〜s /(^ \ [(。+?)\]:\ s | \ r | \ n)// g;'。 – Chris