Regular Expressions 101

Sponsors

Library entries

0
python

Tokenize japanese sentences

no description available
Submitted by anonymous - 4 years ago
0
javascript

XH2

no description available
Submitted by anonymous - 4 years ago
0
javascript

Xv2-1080

no description available
Submitted by anonymous - 4 years ago
0
javascript

Xhams1

no description available
Submitted by anonymous - 4 years ago
0
golang

Message Log

no description available
Submitted by anonymous - 4 years ago
0
javascript

ISO 8601 Date Format

Regex Matching ISO format
Submitted by anonymous - 4 years ago
0
python

Indicador Diario

no description available
Submitted by anonymous - 4 years ago
0
python

Die roll parser

no description available
Submitted by anonymous - 4 years ago
0
javascript

iban test

no description available
Submitted by anonymous - 4 years ago
0
javascript

Base64 Encoded Object GUID

no description available
Submitted by anonymous - 4 years ago
0
python

File extension

no description available
Submitted by anonymous - 4 years ago
0
python

Folder path

no description available
Submitted by anonymous - 4 years ago
0
javascript

MAX_LONG_STRING

no description available
Submitted by anonymous - 4 years ago

Mikrotik Regex Firewall Log Golang

Vote

0

Regular Expression
golang

`
^.+>[\d]\s(?P<Date>\d{4}-\d{2}-\d{2})T(?P<Time>\d{2}:\d{2}:\d{2}).+firewall,info\s(?P<RadUser>\d+).+in:(?P<InputInterface>[^,]+)\s+out:(?P<OutputInterface>[^,]+),\s+(?:src-mac\s+(?P<SourceMacAddress>[^,]+),\s+)?proto\s+(?P<Protocol>\w+)(?:\s+\((?P<Flags>[^)]+)\))?,\s+\[?(?P<SrcIP>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|[a-f\d:]+)\]?(?::(?P<SrcPort>\d+))?->\[?(?P<DstIP>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|[a-f\d:]+)\]?(?::(?P<DstPort>\d+))?,\s(?P<NAT>\w+)\s\((?P<SrcIpLocalNat>\b(?:\d{1,3}\.){3}\d{1,3}\b):(?P<SrcPortLocalNat>\d+)->(?P<SrcIpPublicNat>\b(?:\d{1,3}\.){3}\d{1,3}\b):(?P<SrcPortPublicNat>\d+)\)->(?P<DestIpNat>\b(?:\d{1,3}\.){3}\d{1,3}\b):(?P<DestPortNat>\d+),.+
`

Description

Loading markdown...
Submitted by Vitor Abbade - 2 months ago