I have a file containing nothing but integers and words, separated by arbitrary numbers of spaces, along the following lines:1 alpha plural 1   06   14403 1 4 1 5 9 2 6 5 3 5 8 92 7 1 8 2 8 1 8 2 8 4 5 942   972 insert point here16 7 88But the software that a third party has written to read that file requires that it be floating point.So, how can I add .0 to all the numbers, and leave the words and spacing intact?
How to change all numbers in file into float format
substitute
I think the following substitution would be sufficient::%s/\<\d\+\>/&.0/gThe effect:1.0 alpha plural 1.0   0.06.0   1440.03.0 1.0 4.0 1.0 5.0 9.0 2.0 6.0 5.0 3.0 5.0 8.0 9.02.0 7.0 1.0 8.0 2.0 8.0 1.0 8.0 2.0 8.0 4.0 5.0 9.042.0   972.0 insert point here16.0 7.0 88.0\d matches digits, & is the text that matched the whole pattern.We use word boundaries (\< and \>) so that digits in the middle of a word are not affected.