Regular Expressions 101

Sponsors

Library entries

0
pcre

decimal numbers

match decimal numbers with sign
Submitted by mariano_dm - 8 years ago
-2
pcre

Filter IP from beggin of log

no description available
Submitted by W - 8 years ago
2
pcre

the the

no description available
Submitted by anonymous - 8 years ago
0
pcre

help me please

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

Find common version names in filenames

no description available
Submitted by Jared - 8 years ago
2
pcre

code bracket parser

no description available
Submitted by anonymous - 8 years ago
-10
pcre

need help

no description available
Submitted by sachin - 8 years ago
-3
pcre

test2

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

test

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

Comments in XML document

Match comments in a XML document.
Submitted by Jared Rummler - 8 years ago
1
pcre

match hyphen between quotes

no description available
Submitted by cetanu - 8 years ago
1
pcre

erferf

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

rfrf

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

Russian mobile number normilizer (dumb)

no description available
Submitted by fullpipe - 8 years ago

Validate Syslog Messages

Vote

2

Regular Expression
pcre

/
<(?'Priority'[0-9]{1,3})>(?'Date'[a-zA-Z]{1,3}\s(?(?=\s)\s|[0-9])[0-9])\s(?'Time'(?:[0-1][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9])\s(?'Host'(?(?=\d)(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)+)|\w+)\s(?'Message'.+$)
/

Description

Loading markdown...
Submitted by dislick - 9 years ago