Regular Expressions 101

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(\/\*.*?\*\/?)|(([ ]+)?\/\/.*?$)
/
gms

Description

Regular expression to match all C style comments.

Submitted by Seymoar Regex - 3 years ago