in reply to recursive call of current script

This may not be the 'cleanest' solution, but it requires very little change to existing code. (Assumes that both regexes cannot match the same $sFunction. But I think that is implied by 'switch'.)
for ( $sFunction ) { (/test1/ || /test2/) && do { # .... }; /test2/ && do { # .... }; }

Sorry, Same as LanX's first solution. Comments apply.

Bill