I want match spaces at the beginning of lines in Vim
PseudoCode of what I want to do
^( )*
I know the following fr
I think you can really do is match spaces until some kind of non-space character, right? Try this:
^\( \+\)
Or, for any kind of whitespace:
^\(\s\+\)
In Vim regex (, ) and + need to be escaped. Also, if you planning to use backreference, the syntax is \1 (the first group, for example) and not $1 like Perl.