Regular Expressions 101

Community Patterns

Javascript and PHP Code Comments Regex

0

Regular Expression
PCRE2 (PHP >=7.3)

/
\/\*[\s\S]*?\*\/|([^:]|^)\/\/.*$
/
gm

Description

It detect the comments

Submitted by anonymous - 3 years ago