User:Polbot/code/Function 2

For importing works and Wikifying them, the code has to be modified for each work. For each section below, the code given is a rather generic example, but you'll have to modify the code through trial and error to produce code that works for your source.

Bartleby texts
while ($work =~ /\d+<\/A>/gi) { my $footnote_name = $1; $footnoted = 1;

$work =~ s/^(.*)\d+<\/A>(.*)Note \d+\.\s*<\/B><\/A>\s*(.*?) \[back<\/A>\](.*)$/$1 $3<\/ref>$2$4/si; }	$work =~ s/(.*?)<\/B><\/font>/==$1==/gi; # wikiformat headers $work =~ s/\n?(.*?)<\/A><\/B><\/CENTER>\n?/\n==$1==\n/gi; # more headers $work =~ s/(.*?)<\/i>/$1/gi; # wikiformat italics $work =~ s/(.*?)<\/b>/$1/gi; # wikiformat bold # Wikiformat interior tables while ($work =~ /