I have a .txt file that contains this informaton:
Numb1 Number2[1] Numb3
Now there is 2 things that I am trying to do here. I dont know how to begin this.
First I will search if there is any Word in this file that is named:
Number2[1]
But the tricky thing here is that in this case there is a "1" inside the [].
The problem is that I will not know what number it is inbetween.
So initially what I am searching for is Number2 that consist of [] with an unknown number inside.
The 2 things I am trying to do is this then:
First: Get that number what it now will be and put that to a std::string.
Second: Is to output the file with one change and that is to replace in this case
"Number2[1]" to the word: "ABCDE" so the output file will look like this:
Numb1 ABCDE Numb3
Any idéas on how it could be possible to begin this ?