Regular Expressions 101

Community Patterns

4

CloudFlare

PCRE2 (PHP >=7.3)
Cloud Flare
Submitted by anonymous - 3 years ago
4

Email

PCRE2 (PHP >=7.3)
email format control
Submitted by ahmetbarut - 3 years ago
3

example

PCRE2 (PHP >=7.3)
example
Submitted by anonymous - 3 years ago

Palindromes

2

Regular Expression
PCRE2 (PHP >=7.3)

/
(?(DEFINE) (?<palindrome> # Recursive alternative first to match recursive palindromes. # Invert alternatives order to match nested palindromes individually # and (drastically) reduce backtracking. (?<l1>\p{L})\p{M}* [\s\p{P}]* (?&palindrome) [\s\p{P}]* \k<l1>\p{M}* | (?<l2>\p{L})\p{M}* [\s\p{P}]* \k<l2>\p{M}* | \p{L}\p{M}* ) ) (?<=[\s\p{P}]|^) (?&palindrome) (?(?=\s*\p{P}) (?:\s*\p{P})+ | (?=\s|$))
/
gix

Description

Loading markdown...
Submitted by NicolaF_ - a year ago
(Last modified a year ago)