Community Patterns

Community Library Entry

0

Regular Expression
Created·2023-07-17 23:03
Updated·2023-07-17 23:06
Flavor·ECMAScript (JavaScript)

/
(^|\s*)(!?\/\/)[^\n]+\s*
/
g
Open regex in editor

Description

Sustitution of comments (one line) // Example ~ input (before) ↓↓ : // comment textplain other-text

// Other comment

Example ~ sustition (after) ↓↓: textplain other-text

Submitted by hzvvictor: https://github.com/hzvvictor