I think what you're looking for is:
$aligned[$posCount] = [ $sequence[1] =~ m/^(.*)$reg(.*)$/i ];
If you provided some sample input and expected output, then we could know for sure.
In reply to Re: Need a Method to add recursion to my regex
by tobyink
in thread Need a Method to add recursion to my regex
by vivomancer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |