I have a string that holds characters as well as numbers, e.g.
and I'd like to replace one and two by a new sequence of characters
while keeping the numbers in between unchanged. However, while the two substrings one and two always remain the same, the sequence of number in between may vary in its length; so, for instance,
one0.000230002two, one1293.02two, or one42two
may occur. So far, I have only managed to do this replacement for a fixed numbers of digits using sed and regular expressions.
Only occurences of one and two around number as shown above should be replaced. All other occurences must stay the same.