in reply to Re: Getting + and * to generate multiple captures
in thread Getting + and * to generate multiple captures

I've simplified my problem somewhat to ask the initial question. split() would cause me much pain because I really have multiple regular expressions with quite different separators (not the simple \s used in the example code). However, since all the regular expressions could capture the same content, I would like to only use one piece of code after the appropriate regular expression matches and returns the relevant information. In other words, I'm doing something like:
foreach my $rx (@rxs) { if (my @captures = $text =~ /$rx/) { # do something meaningful with the captures } }
I'd have to have a separate part to split() apart each value negating much of the gain of the loop.