Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
ECMAScript (JavaScript)

/
(?<![;\{\}]|\*\/|\s*\/{2}.*?)$
/
gm

Description

This is a regex to use on JavaScript code that is missing semicolons

Submitted by samunemeth - 3 years ago