Regular Expressions 101

Sponsors

Library entries

0
golang

匹配邮箱

[A-Za-z0-9]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+) `
Submitted by Lintao - a month ago
0
golang

Golang Docker matcher

Used by me for docker-retagger
Submitted by Roman Minebaev - 2 months ago
0
golang

Jira issue number

Matches and catches Jira issue number
Submitted by anonymous - 2 months ago
0
golang

find email addresses

find email addresses
Submitted by anon - 2 months ago
0
golang

Split words in brackets

Split words in brackets
Submitted by ugurakcil - 4 months ago
0
golang

chia plot

chia plot
Submitted by temple - 5 months ago
0
golang

parse dpserver url

parse dpserver url
Submitted by qianshen - 6 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 - 9 years ago