With:
abc = 'abc'
xyz = 'xyz'
word = 'begin abc- middle_xyz_ end'
I need to extract the values of abc
and xyz
from word
.
The result should be
result = 'begin - middle__ end'
How to achieve this with a minimum amount of code?
With:
abc = 'abc'
xyz = 'xyz'
word = 'begin abc- middle_xyz_ end'
I need to extract the values of abc
and xyz
from word
.
The result should be
result = 'begin - middle__ end'
How to achieve this with a minimum amount of code?