Regular Expressions 101

Sponsors

Library entries

0
pcre2

T1

Reguljärt uttryck för att matcha T1
Submitted by Jonas Thor - 7 hours ago
0
java

Other segment

Other segments
Submitted by Lufram - 9 hours ago
0
java

Take segments to string

Take segments to string
Submitted by Lufram - 9 hours ago
0
pcre2

URL 2

http https www - ww1 - ww999
Submitted by Andy - a day ago
0
pcre2

DwgBatch - Ändra datumformat

Kurs DwgBatch Ändra datumformat
Submitted by Jonas Thor - 2 days ago
0
pcre2

find supertype of

for express
Submitted by anonymous - 3 days ago
0
pcre2

Hardware ID

Checks whether the input is a hardware ID
Submitted by Justman10000 - 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