Regular Expressions 101

Sponsors

Library entries

0
dotnet

Aus Mobile number

validates against multiple common formats
Submitted by anonymous - 5 hours ago
0
java

Kyivstar phone number

Kyivstar phone number
Submitted by milka_vlad - 18 hours ago
0
pcre2

MD highlight remover

Remove highlights from md files
Submitted by anonymous - 21 hours ago
0
pcre2

MD higlighter

Mark words to auto-higlight
Submitted by anonymous - 21 hours ago
0
pcre2

perga

regex to find total payment
Submitted by anonymous - 3 days ago
0
pcre2

Match markdown order and unorder list

Same as title
Submitted by anonymous - 3 days ago
0
java

tas-branch-validation

tas-branch-validation
Submitted by doron-hafner - 4 days 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_ - 2 months ago