my $area = $tmp; # anchor the pattern at the start of the line using ^ # then look for the third clump of characters and pick everything +through up to the hyphen. # the ? turns off greedy matching, so you do not get messed up by +duplicate occurrences of -dpt on the same line. $area =~ s/^.*\s+.*\s+(.*?)-dpt/\1/; return $area;
In reply to Re: Simple Regex Question
by sierrathedog04
in thread Simple Regex Question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |