Regular Expressions 101

Sponsors

Library entries

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
1
pcre

Check SQL Insert Into

no description available
Submitted by MelRight - 9 years ago
8
pcre

Date time Advanced

no description available
Submitted by Mr.Neutro - 9 years ago
-2
pcre

Date time

no description available
Submitted by Mr.Neutro - 9 years ago
5
pcre

All href in a tag

Find all href in a tag
Submitted by Miron Yanovskiy - 9 years ago
2
pcre

Split Date

no description available
Submitted by Arun Kumar Sekar - 9 years ago
1
pcre

Number, comma and dot

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

Remove namespaces

no description available
Submitted by anonymous - 9 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