Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(?(DEFINE) (?<u>[А-ЯЁ]) (?<l>[а-яё]) (?<b> (?<=^)(?=[а-яёА-ЯЁ]) | (?<=[а-яёА-ЯЁ])(?=$) | (?<=[^а-яёА-ЯЁ])(?=[а-яёА-ЯЁ]) | (?<=[а-яёА-ЯЁ])(?=[^а-яёА-ЯЁ]) ) ) (?P>b) (?: (?P>l)+(?P>u)(?P>l)+ | (?P>u)(?P>l)+ | (?P>l)+(?P>u) ) (?P>b)
/
gumx

Description

With DEFINE using

Submitted by piterden - 3 years ago