Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
laziness, impatience, and hubris
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Ok, I have been handed an annotated bibliography created in ms word. I have extracted out each entry onto its own line thus:

==========begin biblio===========
-Lightfoot, J. B. St. Paul’s Epistle to the Philippians. Grand Rapids: Zondervan, 1953 (= 1913). Classic commentary by one of the greatest English-speaking NT scholars of all time. 2
-Martin, Ralph P. Philippians. Rev. ed.; NCB. Grand Rapids: Eerdmans, 1980. Clear and informed. 2
O'Brien, Peter, T. Commentary on Philippians. NIGTC. Grand Rapids: Eerdmans, 1991. Thorough and insightful comments on the Greek text. 1
-Silva, Moisés. Philippians. Baker Exegetical Commentary. Grand Rapids: Baker, 1993. Sound comments on the Greek text. 2
-Barth, Markus and Helmut Blanke. The Letter to Philemon: A New Translation with Notes and Commentary. Grand Rapids: Eerdmans, 2000. With over 500 pages devoted to a letter that was probably written on a single sheet of papyrus, this work will be consulted by all who want the most thorough treatment of Philemon and avoided by the rest of us. 3
-Bruce, F. F. The Epistles to the Colossians, to Philemon, and to the Ephesians. NIC. Grand Rapids: Eerdmans, 1984. See comments under “Commentaries on Ephesians.” 2
==========end biblio===========


any ideas how you would parse this into its consituent parts for insertion into a database? Like Author(s), Title, Publisher, comments etc...

There isn't anything obvious to split() on, nor any regex wizardry that occurs to me either.

Thought I'd run it by you guys before hiring a temp to type it all in by hand. Thanks in advance, Pat Rock

In reply to parsing a bibliography by patrickrock

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (9)
    As of 2014-04-25 09:12 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      April first is:







      Results (586 votes), past polls