If users type a passage into the search box on the Talks page, we want to be able to recognise it and grab all the talks that were marked as having covered that passage. This means that if someone was to type "Nick 1 cor 5" we would want to search for talks containing the text "Nick" that were on the passage of 1 Corinthians 5.
This presents a number of challenges, and creating something that works but isn't "ugly" code will be hard.
If 'b' indicates book, 'c' chapter and 'v' verse, these are the patterns we would need to match: b c b c:v b c:v-v b c:v,v b c[:v]-c[:v] (where  mean optional items) any of the above chapter/verse patterns repeated (e.g. b c:v-v; c) * b - b
There may be more pattern combinations too! I think we could say that , and ; both mean the same thing, and likewise : and . both mean the same thing.
In addition, it would be great if we could match at least some simple text equivalents: b chapter 1 b chapter 1 verse 3 * b chapter 1 to chapter 3
Books like Philemon, which have no chapters but only verses, will likely be somewhat problematic!
As for book names themselves; have a look at [[http://bitbucket.org/campuschurch/campuschurch.org.nz/wiki/Book_Names|this wiki page]]. Remember some books will have numbers (arabic or roman) before them. Also some people will use full stops after abbreviations.
Of course, before you start coding, the question is whether or not there is code which could do this for us already, or that could be a useful starting point. Both [[http://www.logos.com/reftagger|Logos RefTagger]] and the [[http://www.musterion.net/wordpress-esv-plugin/|Wordpress ESV Plugin]] do basically what we want, but have somewhat different use-case scenarios.
At the end of the day, what we come up with should be something generic enough (and good enough) that lots of other churches could use it too. I would love for this to be something we could turn into a standalone open-source app (probably with passage validation as well).