Regular Expressions 101

Community Patterns

1...456

Strip Commet

1

Regular Expression
ECMAScript (JavaScript)

/
\/\*.*?\*\/|(\/\/.*)
/
gi

Description

Strip comments with /* ... */ or // ...

Submitted by Willy - 9 years ago