" . $place_reference . "
\n"; # Case 0: A magic word in the first sentence my $place_reference_first_sentence = $place_reference; if ($place_reference =~ /^(.*?)\./) { $place_reference_first_sentence = $1; } if ($place_reference_first_sentence =~ /\b(collection|collections|papers|archives|database|letter|memo|inventory|photographs)\b/i) { # Don't bother trying to parse the reference } # Case 1: Author (possibly empty), then title in italics or quotes elsif ($place_reference =~ /^(.*?)(.*?)<\/i>/ || $place_reference =~ /^(.*)"(.*?)"/) { &new_metadata_entry($place_doc_obj, "ReferenceAuthor", $1); &new_metadata_entry($place_doc_obj, "ReferenceTitle", $2); } # Case 2: Zero or one fullstops, assume no author and title is complete text elsif ($place_reference =~ /^[^\.]*\.[^\.]*$/ || $place_reference !~ /\./) { &new_metadata_entry($place_doc_obj, "ReferenceTitle", $place_reference); } else { print STDERR "