All pastes #199009 Raw Edit

Something

public text v1 · immutable
#199009 ·published 2006-10-12 09:28 UTC
rendered paste body
$parser = HTML::TokeParser::Simple->new(\$difftext);

while (my $tag = $parser->get_tag('td') ) {
	$class = $tag->get_attr('class');

	chomp $class;
	if ($class eq "diff-ntitle") {
		$tdtag = $tag;
	}
}

while (my $linktag = $tdtag->get_tag('a')) {
	$link_text = $linktag->as_is();
	if ($link_text =~ /Special\:Contributions/ig && 
		$link_text =~ /\>([0-2]?[0-9]?[0-9]\.[0-2]?[0-9]?[0-9]\.[0-2]?[0-9]?[0-9]\.[0-2]?[0-9]?[0-9])\</giosx) {
			#Contribs link for anon

			$user = $1;
			$isanon = true;
	}

	if ($link_text =~ /User\:(.+?)\"\stitle\=/gosx) {
		#Userpage link for user
		$user = $1;
		$isanon = false;
	}
}