Regular Expressions 101

Community Patterns

1...45678...877

PHP: find comments without a blank line before

0

Regular Expression
PCRE2 (PHP >=7.3)

/
[;}{]{1}\n{1}[^\S\r\n]*\/\/
/
gm

Description

I'd like to have a blank line before a line with a comment in PHP

Submitted by anonymous - 2 years ago