in reply to Re: Re: speeding up regex
in thread speeding up regex
Try replacing
$count++ while $text =~ /$gene/g; # Count number of instances
with
my $patn = qr/\b$gene\b/;
$count++ while $text =~ /$patn/g;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Compile the regex
by dbwiz (Curate) on Jul 18, 2003 at 15:20 UTC | |
|
Re: Compile the regex
by Abigail-II (Bishop) on Jul 18, 2003 at 11:12 UTC |