[Tutor] Parsing Bible verses

Eduardo Vieira eduardo.susan at gmail.com
Thu May 21 23:26:24 CEST 2009

Hello, I'm planning to create a script to read a certain file, find
the line that contains Bible references and then use that to query a
bible database in order to print the verses in another file.
I will be looking for lines like these:
Lesson Text: Acts 5:15-20, 25; 10:12; John 3:16; Psalm 23

So, references in different chapters are separated by a semicolon. My
main challenge would be make the program guess that 10:12 refers to
the previous book. 15-20 means verses 15 thru 20 inclusive. I'm afraid
that will take more than Regex and I never studied anything about
parser tools, really.

Any suggestion how I should approach this?


More information about the Tutor mailing list