I have tried your suggestion.
If the item contains “The end”, in the then condition it will break.
If it does not contains “The end”, in the else condition it will use Matches activity to match bracket in Words Document, and put the Matches result in ForEach loop and get the number.
This is the outcome
When the line does not contains “The end”, it did go to the then condition.
However, it will stay in the then condition until it get all numbers.
After getting all numbers, it will go through the next line in the if condition.
The first line “The start” is not the word we want, so it go to the else condition.
In the else condition, it will get all numbers (2, 4 and 3).
The next line is “Next line”, and it will get all numbers again.
Sorry if my explanation is confusing
Why does it keep repeating getting all the numbers ?
Is there anywhere i did wrongly ?