if ($_ =~ /.*\s+"(POST|GET)\s*(.*?)\s*HTTP.*?(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/)
10.252.142.174 - - [26/Nov/2015:20:28:02 +0800] "POST /api/register/device/detail HTTP/1.1" 200 77 0.008 123.173.12.29
10.171.246.184 - - [26/Nov/2015:20:28:02 +0800] "POST /api/app_version/enable/check HTTP/1.1" 200 64 0.002 123.173.12.29
10.171.246.184 - - [26/Nov/2015:20:28:03 +0800] "POST /api/client/device/bind HTTP/1.1" 200 74 0.029 123.173.12.29
10.171.246.184 - - [26/Nov/2015:20:28:04 +0800] "POST /api/client/asset HTTP/1.1" 200 377 0.012 123.173.12.29
10.171.246.184 - - [26/Nov/2015:20:28:04 +0800] "POST /api/client/authinfo HTTP/1.1" 200 402 0.006 123.173.12.29
10.252.142.174 - - [26/Nov/2015:20:28:25 +0800] "POST /api/product/detail HTTP/1.1" 200 1579 0.009 123.173.12.29
10.171.246.184 - - [26/Nov/2015:20:28:34 +0800] "GET /api/ HTTP/1.1" 200 287 0.004 115.236.160.82
10.171.246.184 - - [26/Nov/2015:20:28:34 +0800] "GET /api/ HTTP/1.1" 200 287 0.004 115.236.160.82
10.171.246.184 - - [26/Nov/2015:20:28:34 +0800] "GET /api/ HTTP/1.1" 200 287 0.004 115.236.160.82
10.252.142.174 - - [26/Nov/2015:20:28:45 +0800] "POST /api/notice/page HTTP/1.1" 200 1170 0.007 121.40.169.62
10.171.246.184 - - [26/Nov/2015:20:28:45 +0800] "POST /api/product/orderby/all HTTP/1.1" 200 249 0.004 121.40.167.35
10.252.142.174 - - [26/Nov/2015:20:28:45 +0800] "POST /api/product/indexlist HTTP/1.1" 200 3180 0.010 121.40.169.62
10.171.246.184 - - [26/Nov/2015:20:28:46 +0800] "POST /api/index/basicdata HTTP/1.1" 200 107 0.005 121.40.167.35
10.252.142.174 - - [26/Nov/2015:20:28:53 +0800] "POST /api/register/device/detail HTTP/1.1" 200 77 0.005 36.23.54.167
10.171.246.184 - - [26/Nov/2015:20:28:53 +0800] "POST /api/app_version/enable/check HTTP/1.1" 200 64 0.003 36.23.54.167
10.171.246.184 - - [26/Nov/2015:20:28:53 +0800] "POST /api/app/appbanner/list HTTP/1.1" 200 52 0.004 36.23.54.167
10.171.246.184 - - [26/Nov/2015:20:28:56 +0800] "POST /api/client/bankinfo HTTP/1.1" 200 1069 0.008 36.23.54.167
10.252.142.174 - - [26/Nov/2015:20:28:56 +0800] "POST /api/urgent_notice/list HTTP/1.1" 200 52 0.002 36.23.54.167
匹配POST 或者GET
perl 正则或匹配
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
上一篇:perl | 匹配多个
下一篇:perl 比较目录
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
perl 正则匹配嵌套结构
有这么一道题。。aaa bbb #if defined(__MMI_DEL__) ccc #endif ddd eee #if defined(__MMI_DEL__) fff &nb
正则表达式 perl 正则 div 嵌套 动态正则表达式 -
java正则匹配a或b 正则匹配 java
Java使用正则表达式(-|\\+)?(\\d+)*.?\\d+匹配正数、负数、浮点数
java 正则表达式模糊查找 正则表达式 System 字符串