in reply to Looking for a flexible regex...
my $single_range = qr/(?:\d+-\d+)/amsx;
'1-5, 20-250, 37000-41000' =~
/(?: $single_range , [ ]? )* $single_range/msx;
Electric eels were invented at the same time as electricity
Before electricity was invented, electric eels had to stun with gas
Results (306 votes). Check out past polls.