Regular Expressions 101

Community Patterns

Strip from Token to End of Line

-1

Regular Expression
ECMAScript (JavaScript)

/
(\s*--.*)(,?)$
/
gm

Description

Utilize " -- " as a Token and strips from the token to the end of the line.

Submitted by anonymous - 3 years ago