Regular Expressions 101

Library entries

Strip multi-line (star) comments from JavaScript, while leaving any CDATA sections intact.

Vote

4

Regular Expression
pcre

/
\/\*(?!(\<\!\[CDATA\[)|(\]\]>))(.*?)\*\/
/
gs

Description

Loading markdown...
Submitted by Dane MacMillan - 8 years ago