works too. First and last. Hmm. Anyway...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; }
In reply to Re: Re: Re: Re: Regex perplexity
by eweaverp
in thread Regex perplexity
by eweaverp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |