Which of the following experts helped me match the URL?

Source: Internet
Author: User
Who helped me match URLMar812: 51: 2610.20.5haproxy [4843]: 124.240.42.88: 54351 [10.10.20.5: 36672]-& gt; 121.14.0.101: 80 [121.14.0. who helped me match the URL?
Mar 8 12:51:26 10.10.20.5 haproxy [4843]: 124.240.42.88: 54351 [10.10.20.5: 36672]-> 121.14.0.101: 80 [121.14.0.101: 80] [08/Mar/2012: 12: 51: 26.627] http_check http_image/ 6/0/9/10/26 200------- 1520
/500/9/0/0 0/0 {news.sohu.com | http://wei.sohu.com/s2011/wei? 20120308} "GET/upload/sogou_world_20100618/h_bg_tag74on.gif HTTP/1.1"

------ Solution --------------------
$ Log ='
Mar 8 12:51:26 10.10.20.5 haproxy [4843]: 124.240.42.88: 54351 [10.10.20.5: 36672]-> 121.14.0.101: 80 [121.14.0.101: 80] [08/Mar/2012: 12: 51: 26.627] http_check http_image/ 6/0/9/10/26 200------- 1520
/500/9/0/0 0/0 {news.sohu.com | http://wei.sohu.com/s2011/wei? 20120308} "GET/upload/sogou_world_20100618/h_bg_tag74on.gif HTTP/1.1"
';

Preg_match ('/http :\/\/(.*?) \ S *}/S', $ log, $ m );
Print_r ($ m [1]);

------ Solution --------------------
"#: // ([^/] + )#"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.