while ( <DATAFILE> ) { m/\$(pagetitle|category)\s*=\s*\"(.*?)\"/i or next; my $which = lc($1); $pt = $2 if $pt ne "" and $which eq "pagetitle"; $pc = $2 if $pc ne "" and $which eq "category"; last if $pt ne "" and $pc ne ""; }
In reply to Re: Optimizing a regex
by dws
in thread Optimizing a regex
by ZydecoSue
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |