while ($text =~ m|(.*?).*?(.*?)|sg) { print "Found job number $1 in location $2 \n"; } #### my $regexp = ''; $regexp .= "(?=.*?<$_>(.*?)$_>)" foreach qw(jobnumber location); $regexp .= '.*?'; while ($stuff =~ m|$regexp|sog) { print "Found job number $1 in location $2 \n"; }
## my $regexp = ''; $regexp .= "(?=.*?<$_>(.*?)$_>)" foreach qw(jobnumber location); $regexp .= '.*?'; while ($stuff =~ m|$regexp|sog) { print "Found job number $1 in location $2 \n"; }