Regular Expressions 101

Library entries

0
pcre

strip host port

removes port number from URL
Submitted by pc - 6 days ago
0
pcre

Proxy Matcher

Validate 1-223.0-255.0-255.0-255:1-65535
Submitted by dev.tntd2k2 - 9 days ago
0
pcre

latlonlatlon

gg
Submitted by anonymous - 10 days ago
1
pcre

ENEL T5 Mono

T
Submitted by anonymous - 21 days ago
0
pcre

Example 1.1: Pet Name

Example used in slide 39
Submitted by anonymous - a month ago
0
pcre

i++ in bash

asdf
Submitted by anonymous - a month ago
0
pcre

exp1

asdf
Submitted by anonymous - 2 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