How to use variable for matching substrings in a variable inside for each loop?

I need to loop through the matches of a variable, inside another variable. I'm not sure whether the substrings field accepts the variables and in which format.

The below format is not working.

SOLVED. It accepts in the above format.

1 Like