Regular Expressions 101

Sponsors

Library entries

1
javascript

HTML注释

HTML注释
Submitted by anonymous - 6 months ago
1
javascript

phone regex

phone regex
Submitted by antiai - 5 months ago
1
javascript

提取步骤1

提取步骤1
Submitted by liangchao - 5 months ago
1
javascript

array path

Extract the array path from a nested path
Submitted by anonymous - 4 months ago
1
pcre

Polynom

Regex to get polynomial coefficients
Submitted by Balandin Igor - 4 months 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 - 10 years ago