In VIM, using search and replace like
:%s/pat/repl/g, is it possible to have a quantifier in the replace part?
As an example, replace every line matching
pat by exactly 100
# without actually typing exactly 100
#'s into the command?
which, however, doesn't work for me.
More generally, is it possible to replace matches by a captured amount of characters? For example replace
This 3 is a text 5 with some 2 numbers.
This XXX is a text XXXXX with some XX numbers.
using something like