UNPKG

swordjs

Version:

swordjs - access modules from crosswire.org/sword in JS

506 lines (503 loc) 25.7 kB
bcv_parser::regexps.space = "[\\s\\xa0]" bcv_parser::regexps.escaped_passage = /// (?:^ | [^\x1f\x1e\dA-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ] ) # Beginning of string or not in the middle of a word or immediately following another book. Only count a book if it's part of a sequence: `Matt5John3` is OK, but not `1Matt5John3` ( # Start inverted book/chapter (cb) (?: (?: ch (?: apters? | a?pts?\.? | a?p?s?\.? )? \s* \d+ \s* (?: [\u2013\u2014\-] | through | thru | to) \s* \d+ \s* (?: from | of | in ) (?: \s+ the \s+ book \s+ of )?\s* ) | (?: ch (?: apters? | a?pts?\.? | a?p?s?\.? )? \s* \d+ \s* (?: from | of | in ) (?: \s+ the \s+ book \s+ of )?\s* ) | (?: \d+ (?: th | nd | st ) \s* ch (?: apter | a?pt\.? | a?p?\.? )? \s* #no plurals here since it's a single chapter (?: from | of | in ) (?: \s+ the \s+ book \s+ of )? \s* ) )? # End inverted book/chapter (cb) \x1f(\d+)(?:/\d+)?\x1f #book (?: /\d+\x1f #special Psalm chapters | [\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014] | titolo (?! [a-z] ) #could be followed by a number | vedi#{bcv_parser::regexps.space}+anche | ,#{bcv_parser::regexps.space}+ecc | capitoli | capitolo | versetto | versetti | versi | capp | vedi | cap | ecc | cfr | cc | ss | al | vv | e | v | [a-d] (?! \w ) #a-e allows 1:1a | $ #or the end of the string )+ ) ///gi # These are the only valid ways to end a potential passage match. The closing parenthesis allows for fully capturing parentheses surrounding translations (ESV**)**. The last one, `[\d\x1f]` needs not to be +; otherwise `Gen5ff` becomes `\x1f0\x1f5ff`, and `adjust_regexp_end` matches the `\x1f5` and incorrectly dangles the ff. bcv_parser::regexps.match_end_split = /// \d \W* titolo | \d \W* (?:ss|,#{bcv_parser::regexps.space}+ecc|ecc) (?: [\s\xa0*]* \.)? | \d [\s\xa0*]* [a-d] (?! \w ) | \x1e (?: [\s\xa0*]* [)\]\uff09] )? #ff09 is a full-width closing parenthesis | [\d\x1f] ///gi bcv_parser::regexps.control = /[\x1e\x1f]/g bcv_parser::regexps.pre_book = "[^A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ]" bcv_parser::regexps.first = "(?:Primo|Prima|1°|1|I)\\.?#{bcv_parser::regexps.space}*" bcv_parser::regexps.second = "(?:Secondo|Seconda|2°|2|II)\\.?#{bcv_parser::regexps.space}*" bcv_parser::regexps.third = "(?:Terzo|Terza|3°|3|III)\\.?#{bcv_parser::regexps.space}*" bcv_parser::regexps.range_and = "(?:[&\u2013\u2014-]|(?:vedi#{bcv_parser::regexps.space}+anche|vedi|cfr|e)|al)" bcv_parser::regexps.range_only = "(?:[\u2013\u2014-]|al)" # Each book regexp should return two parenthesized objects: an optional preliminary character and the book itself. bcv_parser::regexps.get_books = (include_apocrypha, case_sensitive) -> books = [ osis: ["Ps"] apocrypha: true extra: "2" regexp: ///(\b)( # Don't match a preceding \d like usual because we only want to match a valid OSIS, which will never have a preceding digit. Ps151 # Always follwed by ".1"; the regular Psalms parser can handle `Ps151` on its own. )(?=\.1)///g # Case-sensitive because we only want to match a valid OSIS. , osis: ["Gen"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( Ge(?:n(?:esi)?)? )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Exod"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( E(?:xod|s(?:odo)?) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Bel"] apocrypha: true regexp: ///(^|#{bcv_parser::regexps.pre_book})( Bel(?:[\s\xa0]*e[\s\xa0]*il[\s\xa0]*Drago)? )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Lev"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( L(?:e(?:v(?:itico)?)?|v) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Num"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( N(?:m|u(?:m(?:eri)?)?) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Sir"] apocrypha: true regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Ecclesiastico|S(?:apienza[\s\xa0]*di[\s\xa0]*Sirac(?:ide|h)|ir(?:[aà]cide)?)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Wis"] apocrypha: true regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Sap(?:ienza(?:[\s\xa0]*di[\s\xa0]*Salomone)?)?|Wis) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Lam"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( La(?:m(?:entazioni)?)? )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["EpJer"] apocrypha: true regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Let(?:tera[\s\xa0]*di[\s\xa0]*Geremia|-?ger)|EpJer) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Rev"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:R(?:ev|iv(?:elazione)?)|Ap(?:ocalisse(?:[\s\xa0]*di[\s\xa0]*Giovanni)?)?) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["PrMan"] apocrypha: true regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Orazione[\s\xa0]*di[\s\xa0]*Manasse(?:[\s\xa0]*Re[\s\xa0]*di[\s\xa0]*Giuda)?|Pr(?:eghiera[\s\xa0]*di[\s\xa0]*Manasse|Man)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Deut"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( D(?:e(?:ut(?:eronomio)?)?|t) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Josh"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Josh|G(?:iosu[eèé]|s)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Judg"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Judg|G(?:iudici|dc)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Ruth"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( R(?:t|u(?:th?)?) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["1Esd"] apocrypha: true regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])( (?:Esdra[\s\xa0]*greco|Prim(?:[ao][\s\xa0]*(?:Ésdras|Esdras?))|Terz[ao][\s\xa0]*Esdra|3(?:\.[\s\xa0]*Esdra|°(?:\.[\s\xa0]*Esdra|[\s\xa0]*Esdra)|[\s\xa0]*Esdra)|I(?:II(?:\.[\s\xa0]*Esdra|[\s\xa0]*Esdra)|\.[\s\xa0]*(?:Ésdras|Esdras?)|[\s\xa0]*(?:Ésdras|Esdras?))|1(?:\.[\s\xa0]*(?:Ésdras|Esdras?)|°(?:\.[\s\xa0]*(?:Ésdras|Esdras?)|[\s\xa0]*(?:Ésdras|Esdras?))|[\s\xa0]*(?:Ésdras|Esd(?:ras?)?)|Esd)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["2Esd"] apocrypha: true regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])( (?:Second(?:[ao][\s\xa0]*(?:Ésdras|Esdras?))|Quart[ao][\s\xa0]*Esdra|I(?:I(?:\.[\s\xa0]*(?:Ésdras|Esdras?)|[\s\xa0]*(?:Ésdras|Esdras?))|V(?:\.[\s\xa0]*Esdra|[\s\xa0]*Esdra))|4(?:\.[\s\xa0]*Esdra|°(?:\.[\s\xa0]*Esdra|[\s\xa0]*Esdra)|[\s\xa0]*Esdra)|2(?:\.[\s\xa0]*(?:Ésdras|Esdras?)|°(?:\.[\s\xa0]*(?:Ésdras|Esdras?)|[\s\xa0]*(?:Ésdras|Esdras?))|[\s\xa0]*(?:Ésdras|Esd(?:ras?)?)|Esd)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Isa"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( Is(?:a(?:ia)?)? )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["2Sam"] regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])( (?:Second[ao][\s\xa0]*Samuele|II(?:\.[\s\xa0]*Samuele|[\s\xa0]*Samuele)|2(?:\.[\s\xa0]*Samuele|°(?:\.[\s\xa0]*Samuele|[\s\xa0]*Samuele)|Sam|[\s\xa0]*S(?:am(?:uele)?)?)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["1Sam"] regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])( (?:Prim[ao][\s\xa0]*Samuele|I(?:\.[\s\xa0]*Samuele|[\s\xa0]*Samuele)|1(?:\.[\s\xa0]*Samuele|°(?:\.[\s\xa0]*Samuele|[\s\xa0]*Samuele)|Sam|[\s\xa0]*S(?:am(?:uele)?)?)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["2Kgs"] regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])( (?:Second[ao][\s\xa0]*Re|II(?:\.[\s\xa0]*Re|[\s\xa0]*Re)|2(?:\.[\s\xa0]*Re|°(?:\.[\s\xa0]*Re|[\s\xa0]*Re)|Kgs|[\s\xa0]*Re?)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["1Kgs"] regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])( (?:Prim[ao][\s\xa0]*Re|I(?:\.[\s\xa0]*Re|[\s\xa0]*Re)|1(?:\.[\s\xa0]*Re|°(?:\.[\s\xa0]*Re|[\s\xa0]*Re)|Kgs|[\s\xa0]*Re?)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["2Chr"] regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])( (?:Second[ao][\s\xa0]*Cronache|II(?:\.[\s\xa0]*Cronache|[\s\xa0]*Cronache)|2(?:\.[\s\xa0]*Cronache|°(?:\.[\s\xa0]*Cronache|[\s\xa0]*Cronache)|[\s\xa0]*Cr(?:onache)?|Chr)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["1Chr"] regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])( (?:Prim[ao][\s\xa0]*Cronache|I(?:\.[\s\xa0]*Cronache|[\s\xa0]*Cronache)|1(?:\.[\s\xa0]*Cronache|°(?:\.[\s\xa0]*Cronache|[\s\xa0]*Cronache)|[\s\xa0]*Cr(?:onache)?|Chr)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Ezra"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( E(?:zra|sd(?:ra)?|d) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Neh"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( Ne(?:emia|h)? )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["GkEsth"] apocrypha: true regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Ester[\s\xa0]*(?:\((?:versione[\s\xa0]*greca\)|greco\))|greco)|GkEsth) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Esth"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( E(?:st(?:er|h)?|t) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Job"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Job|G(?:iobbe|b)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Ps"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Ps|S(?:al(?:m[io])?|l)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["PrAzar"] apocrypha: true regexp: ///(^|#{bcv_parser::regexps.pre_book})( Pr(?:eghiera[\s\xa0]*di[\s\xa0]*Azaria|Azar) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Prov"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( Pr(?:ov(?:erbi)?)? )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Eccl"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Ec(?:c(?:l(?:esiaste)?)?)?|Qo(?:h[eè]let|[eè]let)?) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["SgThree"] apocrypha: true regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Cantico[\s\xa0]*dei[\s\xa0]*tre[\s\xa0]*(?:giovani[\s\xa0]*nella[\s\xa0]*fornace|fanciulli)|SgThree) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Song"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Song|C(?:a(?:ntico(?:[\s\xa0]*d(?:ei[\s\xa0]*[Cc]antici|i[\s\xa0]*Salomone))?)?|t)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Jer"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Jer(?:emiah)?|G(?:er(?:emia)?|r)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Ezek"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( Ez(?:e(?:chiele|k))? )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Dan"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( D(?:a(?:n(?:iele)?)?|n) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Hos"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Hos|Os(?:ea)?) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Joel"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Joel|G(?:ioe(?:le)?|l)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Amos"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( Am(?:os)? )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Obad"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:O(?:vadia|bad)|A(?:bd(?:ia)?|d)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Jonah"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Jonah|G(?:io(?:na)?|n)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Mic"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( Mi(?:c(?:hea)?)? )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Nah"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( Na(?:um|h(?:um)?)? )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Hab"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Hab|A(?:b(?:acuc)?|c)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Zeph"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Zeph|So(?:f(?:onia)?)?) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Hag"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Hag|Ag(?:geo)?) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Zech"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( Z(?:ech|a(?:c(?:caria)?)?|c) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Mal"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( M(?:al(?:achia)?|l) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Matt"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Vangelo[\s\xa0]*di[\s\xa0]*(?:San[\s\xa0]*Matteo|Matteo)|M(?:att(?:eo)?|t)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Mark"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Vangelo[\s\xa0]*di[\s\xa0]*(?:San[\s\xa0]*Marco|Marco)|M(?:ar(?:co|k)|[cr])) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Luke"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Vangelo[\s\xa0]*di[\s\xa0]*(?:San[\s\xa0]*Luca|Luca)|L(?:c|u(?:ca|ke)?)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["1John"] regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])( (?:Prim(?:a[\s\xa0]*(?:lettera[\s\xa0]*di[\s\xa0]*Giovanni|Giovanni)|o[\s\xa0]*Giovanni)|I(?:\.[\s\xa0]*Giovanni|[\s\xa0]*Giovanni)|1(?:\.[\s\xa0]*Giovanni|°(?:\.[\s\xa0]*Giovanni|[\s\xa0]*Giovanni)|John|[\s\xa0]*G(?:iovanni|v))) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["2John"] regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])( (?:Second(?:a[\s\xa0]*(?:lettera[\s\xa0]*di[\s\xa0]*Giovanni|Giovanni)|o[\s\xa0]*Giovanni)|II(?:\.[\s\xa0]*Giovanni|[\s\xa0]*Giovanni)|2(?:\.[\s\xa0]*Giovanni|°(?:\.[\s\xa0]*Giovanni|[\s\xa0]*Giovanni)|John|[\s\xa0]*G(?:iovanni|v))) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["3John"] regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])( (?:Terz(?:a[\s\xa0]*(?:lettera[\s\xa0]*di[\s\xa0]*Giovanni|Giovanni)|o[\s\xa0]*Giovanni)|III(?:\.[\s\xa0]*Giovanni|[\s\xa0]*Giovanni)|3(?:\.[\s\xa0]*Giovanni|°(?:\.[\s\xa0]*Giovanni|[\s\xa0]*Giovanni)|John|[\s\xa0]*G(?:iovanni|v))) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["John"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Vangelo[\s\xa0]*di[\s\xa0]*(?:San[\s\xa0]*Giovanni|Giovanni)|John|G(?:iovanni|v)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Acts"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( A(?:cts|t(?:ti(?:[\s\xa0]*degli[\s\xa0]*Apostoli)?)?) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Rom"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Lettera[\s\xa0]*ai[\s\xa0]*Romani|R(?:m|o(?:m(?:ani)?)?)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["2Cor"] regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])( (?:Second(?:a[\s\xa0]*(?:lettera[\s\xa0]*ai[\s\xa0]*Corinzi|Corinzi)|o[\s\xa0]*Corinzi)|II(?:\.[\s\xa0]*Corinzi|[\s\xa0]*Corinzi)|2(?:\.[\s\xa0]*Corinzi|°(?:\.[\s\xa0]*Corinzi|[\s\xa0]*Corinzi)|[\s\xa0]*Co(?:r(?:inzi)?)?|Cor)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["1Cor"] regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])( (?:Prim(?:a[\s\xa0]*(?:lettera[\s\xa0]*ai[\s\xa0]*Corinzi|Corinzi)|o[\s\xa0]*Corinzi)|I(?:\.[\s\xa0]*Corinzi|[\s\xa0]*Corinzi)|1(?:\.[\s\xa0]*Corinzi|°(?:\.[\s\xa0]*Corinzi|[\s\xa0]*Corinzi)|[\s\xa0]*Co(?:r(?:inzi)?)?|Cor)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Gal"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Lettera[\s\xa0]*ai[\s\xa0]*Galati|G(?:àlati|a(?:l(?:ati)?)?)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Eph"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Lettera[\s\xa0]*agli[\s\xa0]*Efesini|E(?:ph|f(?:esini)?)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Phil"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Lettera[\s\xa0]*ai[\s\xa0]*Filippesi|Phil|F(?:il(?:ippesi)?|l)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Col"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Lettera[\s\xa0]*ai[\s\xa0]*Colossesi|C(?:ol(?:ossesi)?|l)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["2Thess"] regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])( (?:Second(?:a[\s\xa0]*(?:lettera[\s\xa0]*ai[\s\xa0]*Tessalonicesi|Tessalonicesi)|o[\s\xa0]*Tessalonicesi)|II(?:\.[\s\xa0]*Tessalonicesi|[\s\xa0]*Tessalonicesi)|2(?:\.[\s\xa0]*Tessalonicesi|°(?:\.[\s\xa0]*Tessalonicesi|[\s\xa0]*Tessalonicesi)|Thess|[\s\xa0]*T(?:e(?:ssalonicesi)?|s))) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["1Thess"] regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])( (?:Prim(?:a[\s\xa0]*(?:lettera[\s\xa0]*ai[\s\xa0]*Tessalonicesi|Tessalonicesi)|o[\s\xa0]*Tessalonicesi)|I(?:\.[\s\xa0]*Tessalonicesi|[\s\xa0]*Tessalonicesi)|1(?:\.[\s\xa0]*Tessalonicesi|°(?:\.[\s\xa0]*Tessalonicesi|[\s\xa0]*Tessalonicesi)|Thess|[\s\xa0]*T(?:e(?:ssalonicesi)?|s))) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["2Tim"] regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])( (?:Second(?:a[\s\xa0]*(?:lettera[\s\xa0]*a[\s\xa0]*Timoteo|Timoteo)|o[\s\xa0]*Timoteo)|II(?:\.[\s\xa0]*Timoteo|[\s\xa0]*Timoteo)|2(?:\.[\s\xa0]*Timoteo|°(?:\.[\s\xa0]*Timoteo|[\s\xa0]*Timoteo)|[\s\xa0]*T(?:i(?:m(?:oteo)?)?|m)|Tim)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["1Tim"] regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])( (?:Prim(?:a[\s\xa0]*(?:lettera[\s\xa0]*a[\s\xa0]*Timoteo|Timoteo)|o[\s\xa0]*Timoteo)|I(?:\.[\s\xa0]*Timoteo|[\s\xa0]*Timoteo)|1(?:\.[\s\xa0]*Timoteo|°(?:\.[\s\xa0]*Timoteo|[\s\xa0]*Timoteo)|[\s\xa0]*T(?:i(?:m(?:oteo)?)?|m)|Tim)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Titus"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Lettera[\s\xa0]*a[\s\xa0]*Tito|T(?:it(?:us|o)|t)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Phlm"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Lettera[\s\xa0]*a[\s\xa0]*Filemone|Phlm|F(?:i(?:l[eè]mone)?|m)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Heb"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Lettera[\s\xa0]*agli[\s\xa0]*Ebrei|Heb|Eb(?:rei)?) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Jas"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Lettera[\s\xa0]*di[\s\xa0]*Giacomo|Jas|G(?:iacomo|[cm])) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["2Pet"] regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])( (?:Second(?:a[\s\xa0]*(?:lettera[\s\xa0]*di[\s\xa0]*Pietro|Pietro)|o[\s\xa0]*Pietro)|II(?:\.[\s\xa0]*Pietro|[\s\xa0]*Pietro)|2(?:\.[\s\xa0]*Pietro|°(?:\.[\s\xa0]*Pietro|[\s\xa0]*Pietro)|Pet|[\s\xa0]*P(?:ietro|t)?)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["1Pet"] regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])( (?:Prim(?:a[\s\xa0]*(?:lettera[\s\xa0]*di[\s\xa0]*Pietro|Pietro)|o[\s\xa0]*Pietro)|I(?:\.[\s\xa0]*Pietro|[\s\xa0]*Pietro)|1(?:\.[\s\xa0]*Pietro|°(?:\.[\s\xa0]*Pietro|[\s\xa0]*Pietro)|Pet|[\s\xa0]*P(?:ietro|t)?)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Jude"] regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:Lettera[\s\xa0]*di[\s\xa0]*Giuda|Jude|G(?:iuda|d)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Tob"] apocrypha: true regexp: ///(^|#{bcv_parser::regexps.pre_book})( T(?:ob(?:i(?:olo|a)?)?|b) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Jdt"] apocrypha: true regexp: ///(^|#{bcv_parser::regexps.pre_book})( (?:G(?:iuditta|dt)|Jdt) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Bar"] apocrypha: true regexp: ///(^|#{bcv_parser::regexps.pre_book})( Bar(?:uch?)? )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["Sus"] apocrypha: true regexp: ///(^|#{bcv_parser::regexps.pre_book})( S(?:toria[\s\xa0]*di[\s\xa0]*Susanna|us(?:anna)?) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["2Macc"] apocrypha: true regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])( 2Macc|(?:Second(?:a[\s\xa0]*Maccabei|o[\s\xa0]*(?:libro[\s\xa0]*dei[\s\xa0]*Maccabei|Maccabei))|II(?:\.[\s\xa0]*Maccabei|[\s\xa0]*Maccabei)|2(?:\.[\s\xa0]*Maccabei|°(?:\.[\s\xa0]*Maccabei|[\s\xa0]*Maccabei)|[\s\xa0]*Mac(?:cabei)?)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["3Macc"] apocrypha: true regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])( 3Macc|(?:Terz(?:a[\s\xa0]*Maccabei|o[\s\xa0]*(?:libro[\s\xa0]*dei[\s\xa0]*Maccabei|Maccabei))|III(?:\.[\s\xa0]*Maccabei|[\s\xa0]*Maccabei)|3(?:\.[\s\xa0]*Maccabei|°(?:\.[\s\xa0]*Maccabei|[\s\xa0]*Maccabei)|[\s\xa0]*Mac(?:cabei)?)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["4Macc"] apocrypha: true regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])( 4Macc|(?:Quart(?:a[\s\xa0]*Maccabei|o[\s\xa0]*(?:libro[\s\xa0]*dei[\s\xa0]*Maccabei|Maccabei))|IV(?:\.[\s\xa0]*Maccabei|[\s\xa0]*Maccabei)|4(?:\.[\s\xa0]*Maccabei|°(?:\.[\s\xa0]*Maccabei|[\s\xa0]*Maccabei)|[\s\xa0]*Mac(?:cabei)?)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi , osis: ["1Macc"] apocrypha: true regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])( 1Macc|(?:Prim(?:a[\s\xa0]*Maccabei|o[\s\xa0]*(?:libro[\s\xa0]*dei[\s\xa0]*Maccabei|Maccabei))|I(?:\.[\s\xa0]*Maccabei|[\s\xa0]*Maccabei)|1(?:\.[\s\xa0]*Maccabei|°(?:\.[\s\xa0]*Maccabei|[\s\xa0]*Maccabei)|[\s\xa0]*Mac(?:cabei)?)) )(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi ] # Short-circuit the look if we know we want all the books. return books if include_apocrypha is true and case_sensitive is "none" # Filter out books in the Apocrypha if we don't want them. `Array.map` isn't supported below IE9. out = [] for book in books continue if include_apocrypha is false and book.apocrypha? and book.apocrypha is true if case_sensitive is "books" book.regexp = new RegExp book.regexp.source, "g" out.push book out # Default to not using the Apocrypha bcv_parser::regexps.books = bcv_parser::regexps.get_books false, "none"