The issue I'm having is I need to replace a few variables in strings with data, for example:
Blah blah S_10 blah S_1 blah blah S_5 blah blah S_15
So the problem is when I iterate through all of the strings, the S_1
replacement undesirably can replace the first 3 characters of S_10
and S_15
, so the string will look like
Blah blah APPLE0 blah APPLE blah blah ORANGE blah blah APPLE5
What's the best way to approach this challenge?