I have a string:
a = 'bla \n bla \n bla \n'
And an array:
b = ['1', '2', '3']
I want to search through the string, and replace every nth instance of \n with the (n-1)th element from the array, resulting in:
a = 'bla 1 bla 2 bla 3'
What is the simplest way for me to do this?