Alan Campbell schreef:
Please don't top-post.
> # look for potentially problematic dissassembly of the following
> form: - # 8004b980 003c34f4 STW.D2T1 A0,*B15--[1]
> my @dis_lines = <>;
> foreach my $ln (@dis_lines) {
> if ($ln =~ m/.*ST[A-Z].*B15--.*[13579]]/) {
> print $ln;
The start of your regexp is still not as specific as is possible. And
you should add non-greediness, as suggested.
Alternatives:
m/ ST[A-Z].*?,\*B15--\[[13579]]/
m/^[0-9a-f]+ +[0-9a-f]+ +ST[A-Z].*?,\*B15--\[[13579]]/
m/^(?:[[:xdigit:]]+ +){2}ST[A-Z].*?,\*B15--\[[13579]]/
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>