Regular Expressions 101

Sponsors

Library entries

0
python

whatsapp meta data

[8/23/18, 2:05:50 PM]
Submitted by Mandar Gite - 2 months ago
0
pcre2

Divide AAAA and MMGG

Division between AAAA and MMGG
Submitted by Alessandro - 2 months ago
0
python

meter number

meter number
Submitted by econ - 2 months ago
0
pcre2

suprnana

whodis
Submitted by anonymous - 2 months ago
0
pcre2

YouTube regex pattern v2

YouTube regex pattern v2
Submitted by anonymous - 2 months ago
0
pcre2

Soundcloud pattern

Soundcloud pattern
Submitted by anonymous - 2 months ago
0
pcre2

Email Regex

A well equiped regex
Submitted by anonymous - 2 months ago
0
pcre2

E

E
Submitted by anonymous - 2 months ago
0
pcre2

demo

regex grouping demo
Submitted by Lidro - 2 months ago
0
python

租赁

租赁
Submitted by 租赁 - 2 months ago

Simplified nginx access log filter with group name

Vote

0

Regular Expression
python

"
(?P<remote_addr>(?:^|\b(?<!\.))(?:1?\d\d?|2[0-4]\d|25[0-5])(?:\.(?:1?\d\d?|2[0-4]\d|25[0-5])){3}(?=$|[^\w.]))\s-\s(?P<remote_usr>-|[a-z_][a-z0-9_]{0,30})\s(?P<date_time>\[(?P<date>[0-2][0-9]\/\w{3}\/[12]\d{3}):(?P<time>\d\d:\d\d:\d\d).*\])\s(?P<request>\"(?P<req_method>GET|POST|HEAD|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH)\s(?P<req_uri>\/[^\s]*)\s(?P<http_ver>HTTP/\d\.\d)\")\s(?P<status>\d{3})\s(?P<body_byte_sent>\d+)\s\"(?P<http_referer>[^\s]+)\"\s\"(?P<user_agent>[^\"]+)\"\s\"(?P<forward_for>[^\"]+)\"
"

Description

Loading markdown...
Submitted by anonymous - 4 years ago