in reply to Re^2: Simple regex with numbers
in thread Simple regex with numbers

Not as easy, but solvable without slurping in the whole file. I assume you read from <> to $_
my $num; while (m#Results\s+<b>[\d,]+\s+thru\s+[\d,]+</b>\s+of\s+([\d,]+)?\s*$# +) { $num=$1; last if defined $1 or eof; $_.=<>; } # value, if any, in $num

$\=~s;s*.*;q^|D9JYJ^^qq^\//\\\///^;ex;print