View Full Version : Regular expressions and "counting" ..

November 13th, 2010, 10:03 AM
I was thinking the other day when I typed the following in vim:

:%s/^[ ]\+//

Can I get a count of those found spaces ?
Can I then use that count when replacing ?
Or is this something that regular expressions can't handle and I have use the workarounds available ?

Sharing of knowledge is appreciated :)

December 6th, 2010, 08:16 PM
Nobody know this ?