in reply to Capturing unknown number of matches

Another solution:
use strict; my $string ="RRULE:FREQ=WEEKLY;BYDAY=TU,TH;UNTIL=20110429T000000;WKST= +SU"; my($days) = $string =~ /BYDAY=([^;]+);/; my @days = split(/,/, $days); print join("\t",@days);
I see Ikegami already provided neat solutions!