By design, Instr() returns only the position of first occurrence of search string in the text, if found. If you need multiple occurrences you have to loop thru the Instr() action till the position becomes 0 (zero).
I am assuming that the file data is read into a Data Item (looking at the screenshot of Instr action), and suggesting the below flow-
Have 4 Data Items: Counter, Position, StartByte, ConcatData with initial values as 1, 0, 1, "String Found in Position" respectively
- Start
- Anchor1
- Decision1 Stage with condition Counter =1
- Yes Path of Decision1
- Instr Action from Strings VBO
- Calc Stage to increment Counter. Link this to Decision2
- No Path of Decision1
- Calc Stage with expression [Position]+1 stored in StartByte
- Instr Action from Strings VBO. Link this to the Decision2
- Decision2 stage to check if Position is 0 (0 means string not found)
- Yes Path Decision2
- Add a Decision3 stage with condition Len([ConcatData]) = Len("String Found in Position")
- Yes Path of Decision3
- Calc Stage with expression "String Not Found" Stored in ConcatData
- Link to End
- No Path of Decision3
- Action "Remove Non-word Characters" from Utility Strings VBO
- Link to End
- No Path of Decision2
- Calc Stage with Expression [ConcatData]&[Position]&", "
- Link this to Anchor1
In the flow there is no Loop Stage, however using Anchors and Decision stages we can simulate looping.
Unfortunately, I cannot share screenshots, if you follow the above steps you should be achieving the required.
Post back how to goes!