Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
^( +)(?=\S)
/
gm

Description

find the number of spaces at the beginning of lines in a file.

Submitted by andy - 9 years ago