You can use the first regex provided for both the inputs and make sure to use the for each because the the first input contains Ben for multiple times and you need to print all those and in the same manner the second input contains Ben for only one time so if you use for each the second input will be iterated only for one time.so it’s better to use both inputs with the first provided regex.
Input= "BEN Andrew Grove 100
BEN Suzy 50
INS Marshall
BEN Alex 100
PAY Marshall"
Output= System.Text.RegularExpressions.Regex.Matches(Input,"(?<=BEN\s*).*")
Output is of DataType IEnumerable(System.Text.RegularExpressions.Match)
→ Use For Each loop to iterate through Output and print currentItem.
Workflow: