Going from:
to
in vim:
John has one hundred apples
Jane has twelve hundred and fifty seven apples
Mary has thirty seven apples
to
John has one_hundred apples
Jane has twelve_hundred_and_fifty_seven apples
Mary has thirty_seven apples
in vim:
.,$s/\(has .*\)\@<= \(.* apples\)\@=/_/g