You'll probably have to do a double substitution:
s/\v\d+\.\d+/\=substitute(submatch(0),'.',' ','g')/g
This uses an expression for the replacement (:h sub-replace-expression
), which simply replaces every character in the matched string (submatch(0)
) with a space (subtitute(..., '.', ' ', 'g')
).
Or, repeat
:
s/\v\d+\.\d+/\=repeat(' ', len(submatch(0)))/g