Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

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

Description

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

Submitted by William Ramsey - 8 years ago