in reply to Re: Re: Re: Regex perplexity
in thread Regex perplexity

And... that made me realize that this:
sub FindPositions { my $string = $_[0]; my $id = $_[1]; # slice out the appropriate part of the string ($string) = $string =~ /(><a name = $id>.*?<\/pre>)/s; my @positions = $string =~ m/<a name = $id>.*?Query: (\d+).*?Sbjct: +(\d+).*?<\/pre>/s; push (@positions, $string =~ m/<a name = $id>.*Query: \d+\s+[a-z]+ ( +\d+)\n.*\nSbjct: \d+\s+[a-z]+ (\d+)\n<\/pre>/s); return @positions; }
works too. First and last. Hmm. Anyway...