Regular Expressions 101

Community Patterns

16

Alphanumeric Regex

PCRE (PHP <7.3)
no description available
Submitted by Deepan - 9 years ago
5

ipv6

PCRE (PHP <7.3)
Match an ipv6 address
Submitted by Frusty - 8 years ago
9

only numbers

PCRE (PHP <7.3)
A string with only numbers in
Submitted by Gotts - 8 years ago
4

Phone number

PCRE (PHP <7.3)
no description available
Submitted by Mark Landry - 9 years ago
1...34567...591

Date Regex(DD/MM/yyyy)

18

Regular Expression
PCRE (PHP <7.3)

/
^(((0[1-9]|[12]\d|3[01])\/(0[13578]|1[02])\/((19|[2-9]\d)\d{2}))|((0[1-9]|[12]\d|30)\/(0[13456789]|1[012])\/((19|[2-9]\d)\d{2}))|((0[1-9]|1\d|2[0-8])\/02\/((19|[2-9]\d)\d{2}))|(29\/02\/((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))$
/
g

Description

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