Community Patterns

Community Library Entry

0

Regular Expression
Created·2017-03-14 17:18
Flavor·ECMAScript (JavaScript)

/
(\/\*[\s\S]*?(.*?)\*\/)|(\/\/.*)
/
gm
Open regex in editor

Description

This covers both // styled comments as well as comments between /* and */. Supports multiline as well. Enjoy

Submitted by William Ramsey