Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(^\w.*\n\n)+(^(##.*\n)+)
/
gm

Description

reverses order when code is followed by comments (comments prepended with ## )

Submitted by anonymous - 3 years ago