Regular Expressions 101

Community Patterns

-3

IPv4 address

Python
Matches any IPv4 address
Submitted by anonymous - 8 years ago
-2

example

Python
match
Submitted by anonymous - 10 years ago
-2

eee

Python
no description available
Submitted by anonymous - 9 years ago
-2

link

Python
no description available
Submitted by NTP-[SADAS] - 9 years ago
-2

five word capture

Python
no description available
Submitted by anonymous - 9 years ago
-2

Host and domains

Python
no description available
Submitted by anonymous - 9 years ago
-2

IPv4

Python
allows for all legal IPv4 addresses
Submitted by anonymous - 9 years ago
-2

twitter usernames

Python
no description available
Submitted by anonymous - 9 years ago
-2

checklists item

Python
checklists item
Submitted by Tobias Hochgürtel - 9 years ago
-2

filter

Python
no description available
Submitted by anonymous - 9 years ago

Mikrotik firewall logs

2

Regular Expression
Golang

`
^((?P<mode>[^:]+):\s)?in:(?P<InputInterface>[^,]+)\s+out:(?P<OutputInterface>[^,]+),\sconnection-state:(?P<ConnectionState>[^\s]+)\s+(?:src-mac\s+(?P<SourceMacAddress>[^,]+),\s+)?proto\s+(?P<Protocol>\w+)(?:\s+\((?P<Flags>[^)]+)\))?,\s+\[?(?P<SourceAddress>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|[a-f\d:]+)\]?(?::(?P<SourcePort>\d+))?->\[?(?P<DestinationAddress>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|[a-f\d:]+)\]?(?::(?P<DestinationPort>\d+))?,\s(NAT\s?\[?(?P<NatSourceAddress>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|[a-f\d:]+)\]?(?::(?P<NatSourcePort>\d+))?->\(\[?(?P<NatExternalAddress>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|[a-f\d:]+)\]?(?::(?P<NatExternalPort>\d+))?->\[?(?P<NatInternalAddress>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|[a-f\d:]+)\]?(?::(?P<NatInternalPort>\d+))?\),\s)?len\s+(?P<Length>\d+)
`
gm

Description

Loading markdown...
Submitted by anonymous - 6 months ago
(Last modified 6 months ago)