Regular Expressions 101

Sponsors

Library entries

0
javascript

check mail

Vérifie si le mail est valide ou non
Submitted by anonymous - 13 hours ago
0
java

lat cyr letters

only lat and cyr letters
Submitted by anonymous - 5 days ago
0
javascript

Find WikiRace baseURL

https://github.com/d-k-bo/WikiRace
Submitted by anonymous - 6 days ago
0
java

LinkedIn Profile Url

LinkedIn Profile Url
Submitted by Morons - 7 days ago
1
javascript

File extension

Retrieve the file extension of a filename
Submitted by anonymous - 16 days 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 - a month ago