I have a macro that defines 10 capture groups to identify 10 strings between tags.
This works fine, as long as there are exactly 10 tag pairs.
However, when there are less tag pairs than capture groups, the macro seems to go into a loop.
This is the macro:
How can I solve this?
The solution I can think of is to count the number of tag pairs and to use an IF statement: if there are 9 tag pairs, go to the handler for 9 capture groups.
I tried to understand and use that code but indeed got stuck. I changed the lines to get a counter and wanted to use that for a clumsy approach to get a set of 10 capture groups:
If number of paired tags is 1, var captureGroup is:
It looks very simple, and it works. But don't ask me to explain what it does :).
I'll have work to do now: I'll have to replace the red action with actions to look up every corresponding target term for each source term (= Local_Line). Looks promising and flexible. To be cont.