Regular Expressions 101

Community Patterns

number of spaces at beginning of lines

1

Regular Expression
ECMAScript (JavaScript)

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

Description

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

Submitted by andy - 8 years ago