Regular Expressions 101

Community Patterns

0

ex1

PCRE (PHP <7.3)
no description available
Submitted by anonymous - 3 years ago
0

ex3

PCRE (PHP <7.3)
no description available
Submitted by anonymous - 3 years ago
0

Test

Golang
no description available
Submitted by anonymous - 3 years ago
0

address

PCRE (PHP <7.3)
no description available
Submitted by anonymous - 3 years ago
0

Revert

PCRE (PHP <7.3)
no description available
Submitted by anonymous - 3 years ago
0

CEP mask

PCRE (PHP <7.3)
Brazilian CEP mask
Submitted by anonymous - 3 years ago

my apache2 access.log regex

1

Regular Expression
PCRE (PHP <7.3)

/
(?<src_host>\w+\.\w+:\d{2})\s(?<src_ip>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\D{1,6}(?<date_time>[^ ]+)\s(?<GMT_offset>[^ ]+)\]\s"(?<action>(GET|POST|HEAD|TRACE|PUT|DELETE|CONNECT))\s(?<hash_url>[^ ]+)\s(?<protocol>[^\"]+)\"\s(?<code>\d{1,3})\s(?<size>[^ ]+)\s\"(?<referrer>[^ ]+)\"\s\"(?<user_agent>[^ ]+.+)\"
/
g

Description

Loading markdown...
Submitted by marf - 8 years ago