in reply to curl substitute

The sed program is only used for this regex substitution:
s/.*Updates.*<span class=\"stats_count numeric\">\\(.*\\<\\/span>.*+/\ +\1/p

Which could be written in Perl as:

$str =~ s{ .*?Updates.*? <span\s+class\="stats_count\s+numeric"> (.*?) </span> }{ $1 }xs;