Regular Expressions 101

Sponsors

Library entries

0
pcre

match comments

/** comments */ // to the end /* comments */
Submitted by monk - 12 hours ago
0
pcre

ASD

HI
Submitted by anonymous - 18 hours ago
0
pcre2

optional

optional
Submitted by anonymous - 21 hours ago
0
python

Pick third section

Pick third section
Submitted by Charles - 2 days ago
0
pcre2

Barcode Regex

Barcode Regex
Submitted by anonymous - 2 days ago
1
pcre2

todos and tags in code

todos and tags in code
Submitted by anonymous - 2 days ago
0
pcre2

Note Body HTML

Match all valid HTML tags
Submitted by anonymous - 3 days ago

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 - 9 years ago