Regular Expressions 101

Library entries

2
pcre2

Check Phone numbers

Other patterns
Submitted by https://joserobinson.com - 2 years ago
2
pcre2

Grabify URL Detector

Detects any Grabify IP tracker links
Submitted by ShadowNox - 2 years ago
2
pcre2

UUID 4

Detects any UUID 4 strings
Submitted by ShadowNox - 2 years ago
2
pcre2

Delete hour range

Select duplicate a.m. - p.m range
Submitted by profeivan - a year ago
2
dotnet

Replace sub-strings in string

Replace sub-strings in string
Submitted by anonymous - 5 months ago

Palindromes

Vote

2

Regular Expression
pcre2

/
(?(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_ - 4 months ago