Can anyone help me in converting the following code from PERL to Javascript??while ($r = 1) {$e =~ s/(.*?)<\/span>/\1/gi;unless ($e =~ /(.*?)<\/span>/) { $c =16; } if ($c >12 ) { last; }}