Regular Expressions 101

Community Patterns

whitespace only lines

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^(?:[\t ]*(?:\r?\n|\r))+
/
gm

Description

Matches whitespace only lines common to annoying website code.

Submitted by anonymous - 2 years ago