I have exactly 15 character long strings like these. There are ALWAYS only two "1"s which may or may not be separated by "0"s.
110000000000000
100010000000000
000100001000000
000000010010000
000000000001100
000011000000000
What I want to do is this. Replace all such "0"s that are between the two "1"s. I do not want to replace the "0"s that are after the second "1" or before the first "1".
So the above data after the solution will look like
110000000000000
111110000000000
000111111000000
000000011110000
000000000001100
000011000000000
Thank you.
This is basically a string I created out of 15 counting variables with values 0 or 1 and this is a long-winded hack to make the "in between" zeroes count for another purpose.
110000000000000
100010000000000
000100001000000
000000010010000
000000000001100
000011000000000
What I want to do is this. Replace all such "0"s that are between the two "1"s. I do not want to replace the "0"s that are after the second "1" or before the first "1".
So the above data after the solution will look like
110000000000000
111110000000000
000111111000000
000000011110000
000000000001100
000011000000000
Thank you.
This is basically a string I created out of 15 counting variables with values 0 or 1 and this is a long-winded hack to make the "in between" zeroes count for another purpose.
Comment