Regular Expressions 101

Sponsors

Library entries

1
pcre

Test CCPR message

no description available
Submitted by anonymous - 7 years ago
1
pcre

afadfad

no description available
Submitted by anonymous - 7 years ago
1
pcre

Extract PORT from URL

Extract port from URL
Submitted by anonymous - 7 years ago
1
pcre

username

Letras, Ñ, acentos, números, guión y barra baja
Submitted by diegosanz - 7 years ago
1
python

fact refactor

no description available
Submitted by anonymous - 7 years ago
-2
python

twitter usernames

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

token

replace token like [foo:bar:ba zz]
Submitted by anonymous - 7 years ago
1
javascript

search text matching any word

search text matching any word
Submitted by Hiren Shah - 7 years ago
-2
javascript

Date format regex for ddMMMyyyy

no description available
Submitted by anonymous - 7 years ago
2
pcre

date formatting mm/dd/yyyy format

no description available
Submitted by anonymous - 7 years ago
1
pcre

a

no description available
Submitted by anonymous - 7 years ago
1
pcre

url match

match the most common url stuctures
Submitted by whoevor - 7 years ago

MikroTik FireWall

Vote

11

Regular Expression
pcre

/
.+HappyMK\s?(?<action>\S+)\s(?<chain>\w+):\sin:(?<int_in>\S+)\sout:(?<int_out>\S+), src-mac\s(?<src_mac>\S+),\sproto\s(?<prot>\w+)(\s(?<flags>\S+),|,)\s(?<src_ip>\b(?:\d{1,3}\.){3}\d{1,3}\b):(?<src_port>\d+)->(?<dest_ip>\b(?:\d{1,3}\.){3}\d{1,3}\b):(?<dest_port>\d+),(\s(?<NAT>\w+)\s\((?<src_nat_localip>\b(?:\d{1,3}\.){3}\d{1,3}\b):(?<src_nat_local_port>\d+)->(?<src_nat_public_ip>\b(?:\d{1,3}\.){3}\d{1,3}\b):(?<src_nat_public_port>\d+)\)->(?<dest_nat_ip>\b(?:\d{1,3}\.){3}\d{1,3}\b):(?<dest_nat_port>\d+),)?(\sprio\s(?<prio>\d+->\d+),)?\slen\s(?<len>\d+)
/

Description

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