How to write a server log regular expression

Source: Internet
Author: User
How to write regular expressions for server logs 2013-06-23 & nbsp; 04:33:51 & nbsp; W3SVC1539885 & nbsp; 198.56.185.162 & nbsp; GET & nbsp;/robots.txt & nbsp;-& nbsp; 80 & nbsp;-& nbsp; 66.249.75.65 & nbsp; Mozilla/5. how to write a server log regular expression?
04:33:51 W3SVC1539885 198.56.185.162 GET/robots.txt-80-66.249.75.65 Mozilla/5.0 + (compatible; + Googlebot/2.1; ++ http://www.google.com/bot.html) 404 0 2

I want to match date 2013-06-23/time 04:33:51/server ip198.56.185.162/file address robots.txt/spider ip66.249.75.65/spider info Mozilla/5.0 + (compatible; + Googlebot/2.1; + + http://www.google.com/bot.html) /status code 404 0 2/. how can this be precisely matched? Share:
------ Solution --------------------
This score cannot be wasted.

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.