swordjs
Version:
swordjs - access modules from crosswire.org/sword in JS
506 lines (503 loc) • 26.1 kB
text/coffeescript
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]
| title (?! [a-z] ) #could be followed by a number
| kap[íi]tuli | kafli | kafla | vers | ff | og | -
| [a-e] (?! \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* title
| \d \W* ff (?: [\s\xa0*]* \.)?
| \d [\s\xa0*]* [a-e] (?! \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 = "(?:1|I)\\.?#{bcv_parser::regexps.space}*"
bcv_parser::regexps.second = "(?:2|II)\\.?#{bcv_parser::regexps.space}*"
bcv_parser::regexps.third = "(?:3|III)\\.?#{bcv_parser::regexps.space}*"
bcv_parser::regexps.range_and = "(?:[&\u2013\u2014-]|og|-)"
bcv_parser::regexps.range_only = "(?:[\u2013\u2014-]|-)"
# 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: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
(?:Fyrsta[\s\xa0]*(?:b[oó]k[\s\xa0]*M(?:[oó]se)|M[oó]seb(?:[oó]k))|I(?:\.[\s\xa0]*M[oó]s(?:eb(?:[oó]k)?)|[\s\xa0]*M[oó]s(?:eb(?:[oó]k)?))|1(?:\.[\s\xa0]*M[oó]s(?:eb(?:[oó]k)?)|[\s\xa0]*M[oó]s(?:eb(?:[oó]k)?)|Mós)|Gen(?:esis)?)|[1I](?:\.[\s\xa0]*M(?:[oó]s|[\s\xa0]*M[oó]s))|[1I][\s\xa0]*M(?:[oó]s)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Exod"]
regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
(?:[OÖ]nnur[\s\xa0]*(?:b(?:[oó]k[\s\xa0]*M(?:[oó]se)|M[oó]seb(?:[oó]k)))|II(?:\.[\s\xa0]*M[oó]s(?:eb(?:[oó]k)?)|[\s\xa0]*M[oó]s(?:eb(?:[oó]k)?))|2(?:\.[\s\xa0]*M[oó]s(?:eb(?:[oó]k)?)|[\s\xa0]*M[oó]s(?:eb(?:[oó]k)?)|Mós)|Exod(?:us)?)|(?:[OÖ]nnur[\s\xa0]*M(?:[oó]seb(?:[oó]k))|II(?:\.[\s\xa0]*M[oó]s|[\s\xa0]*M[oó]s)|2(?:\.[\s\xa0]*M[oó]s|[\s\xa0]*M[oó]s))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Bel"]
apocrypha: true
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
Bel(?:[\s\xa0]*og[\s\xa0]*drekinn)?
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Lev"]
regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
(?:Þriðja[\s\xa0]*(?:b[oó]k[\s\xa0]*M(?:[oó]se)|M[oó]seb(?:[oó]k))|III(?:\.[\s\xa0]*M[oó]s(?:eb(?:[oó]k)?)|[\s\xa0]*M[oó]s(?:eb(?:[oó]k)?))|3(?:\.[\s\xa0]*M[oó]s(?:eb(?:[oó]k)?)|[\s\xa0]*M[oó]s(?:eb(?:[oó]k)?)|Mós)|Lev(?:iticus)?)|(?:III(?:\.[\s\xa0]*M[oó]s|[\s\xa0]*M[oó]s)|3(?:\.[\s\xa0]*M[oó]s|[\s\xa0]*M[oó]s))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Num"]
regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
(?:Fj[oó]rða[\s\xa0]*(?:b(?:[oó]k[\s\xa0]*M(?:[oó]se)|M[oó]seb(?:[oó]k)))|IV(?:\.[\s\xa0]*M[oó]s(?:eb(?:[oó]k)?)|[\s\xa0]*M[oó]s(?:eb(?:[oó]k)?))|4(?:\.[\s\xa0]*M[oó]s(?:eb(?:[oó]k)?)|[\s\xa0]*M[oó]s(?:eb(?:[oó]k)?)|Mós)|Num(?:eri)?)|(?:Fj[oó]rða[\s\xa0]*M(?:[oó]seb(?:[oó]k))|IV(?:\.[\s\xa0]*M[oó]s|[\s\xa0]*M[oó]s)|4(?:\.[\s\xa0]*M[oó]s|[\s\xa0]*M[oó]s))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Sir"]
apocrypha: true
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
S[ií]r(?:aksb(?:[oó]k)?)|S(?:[ií]r)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Wis"]
apocrypha: true
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:S(?:peki[\s\xa0]*Sal[oó]mons|Sal)|Wis)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Lam"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:H(?:armlj[oó]ðin|lj)|Lam)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["EpJer"]
apocrypha: true
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:EpJer|B(?:r[eé]f[\s\xa0]*Jerem(?:[ií]a)|Jer))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Rev"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:Op(?:inberun(?:[\s\xa0]*J[oó]hannesar|arb[oó]k(?:[\s\xa0]*J(?:[oó]hannesar|in)))|b)|Rev)|Opinberunarb(?:[oó]kin)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["PrMan"]
apocrypha: true
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:PrMan|B(?:æn[\s\xa0]*Manasse|Mn))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Deut"]
regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
(?:Fimmta[\s\xa0]*(?:b[oó]k[\s\xa0]*M(?:[oó]se)|M[oó]seb(?:[oó]k))|V(?:\.[\s\xa0]*M[oó]s(?:eb(?:[oó]k)?)|[\s\xa0]*M[oó]s(?:eb(?:[oó]k)?))|5(?:\.[\s\xa0]*M[oó]s(?:eb(?:[oó]k)?)|[\s\xa0]*M[oó]s(?:eb(?:[oó]k)?)|Mós)|Deut(?:eronomium)?)|[5V](?:\.[\s\xa0]*M(?:[oó]s|[\s\xa0]*M[oó]s))|[5V][\s\xa0]*M(?:[oó]s)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Josh"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
J(?:os(?:[uú]ab(?:[oó]k)|h)?|ós[uú]ab(?:[oó]k)?)|Jós
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Judg"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:Judg|D(?:[oó]m(?:arab(?:[oó]k(?:in)?))?))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Ruth"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
Rut(?:arb[oó]k|h)?
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["1Esd"]
apocrypha: true
regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
1Esd
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["2Esd"]
apocrypha: true
regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
2Esd
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Isa"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:Isa|Jes(?:aja)?)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["2Sam"]
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-Ɦꟸ-ꟿ])(
(?:Fyrri[\s\xa0]*(?:b[oó]k[\s\xa0]*konunganna|Konungab[oó]k|konungabók)|I(?:\.[\s\xa0]*Kon|[\s\xa0]*Kon)|1(?:\.[\s\xa0]*Kon|[\s\xa0]*Kon|Kgs))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["2Chr"]
regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
(?:S(?:iðari[\s\xa0]*Kron[ií]kub(?:[oó]k)|íðari[\s\xa0]*(?:Kron[ií]kub(?:[oó]k)|kroníkubók))|II(?:\.[\s\xa0]*Kro|[\s\xa0]*Kro)|2(?:\.[\s\xa0]*Kro|[\s\xa0]*Kro|Chr))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["1Chr"]
regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
(?:Fyrri[\s\xa0]*(?:Kron[ií]kub(?:[oó]k)|kroníkubók)|I(?:\.[\s\xa0]*Kro|[\s\xa0]*Kro)|1(?:\.[\s\xa0]*Kro|[\s\xa0]*Kro|Chr))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Ezra"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
E(?:zra|sr(?:ab[oó]k)?)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Neh"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
Neh(?:em[ií]ab(?:[oó]k))?
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["GkEsth"]
apocrypha: true
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:Esterarb[oó]k[\s\xa0]*hin[\s\xa0]*gr(?:[ií]ska)|GkEsth)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Esth"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
Est(?:erarb[oó]k|h)?
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Job"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
Job(?:sb[oó]k)?
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Ps"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:S(?:[aá]lmarnir|lm)|Ps)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["PrAzar"]
apocrypha: true
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:Bæn[\s\xa0]*Asarja|PrAzar)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Prov"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:Prov|O(?:rðskviðirnir|kv))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Eccl"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:Eccl|Pr(?:[eé]d(?:ikarinn)?))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["SgThree"]
apocrypha: true
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:Lofs[oö]ngur[\s\xa0]*ungmennanna[\s\xa0]*þriggja|SgThree)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Song"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:Song|Lj(?:[oó]ðalj(?:[oó]ðin)|l))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Jer"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
Jer(?:em[ií]a)?
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Ezek"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
E(?:zek|s(?:ek[ií]el|k))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Dan"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
Dan(?:[ií]el)?
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Hos"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
H(?:[oó]s(?:ea)?)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Joel"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
J(?:[oó]el|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})(
(?:Ob(?:ad(?:[ií]a)?)?|Ób(?:ad[ií]a)?)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Jonah"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
J(?:on(?:a[hs])?|ón(?:as)?)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Mic"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
M(?:i(?:c|ka?)|íka?)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Nah"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
Nah(?:[uú]m)?
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Hab"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
Hab(?:akkuk)?
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Zeph"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:Zeph|Sef(?:an[ií]a)?)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Hag"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
Hag(?:ga[ií])?
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Zech"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:Zech|Sak(?:ar[ií]a)?)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Mal"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
Mal(?:ak[ií])?
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Matt"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
Matt(?:eusarguðspjall)?
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Mark"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
M(?:ark(?:[uú]sarguðspjall)?|rk)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Luke"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
L(?:uk(?:asarguðspjall|e)?|úk(?:asarguðspjall)?)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["1John"]
regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
1John|(?:Fyrsta[\s\xa0]*(?:br[eé]f[\s\xa0]*J(?:[oó]hannesar[\s\xa0]*hið[\s\xa0]*almenna)|J[oó]hannesarbr(?:[eé]f))|[1I](?:\.[\s\xa0]*J(?:[oó]h|[\s\xa0]*J[oó]h)))|[1I][\s\xa0]*J(?:[oó]h)|Fyrsta[\s\xa0]*br[ée]f[\s\xa0]*J(?:[oó]hannesar)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["2John"]
regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
2John|(?:Annað[\s\xa0]*(?:br[eé]f[\s\xa0]*J(?:[oó]hannesar)|J[oó]hannesarbr(?:[eé]f))|II(?:\.[\s\xa0]*J[oó]h|[\s\xa0]*J[oó]h)|2(?:\.[\s\xa0]*J[oó]h|[\s\xa0]*J[oó]h))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["3John"]
regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
3John|(?:Þriðja[\s\xa0]*(?:br[eé]f[\s\xa0]*J(?:[oó]hannesar)|J[oó]hannesarbr(?:[eé]f))|III(?:\.[\s\xa0]*J[oó]h|[\s\xa0]*J[oó]h)|3(?:\.[\s\xa0]*J[oó]h|[\s\xa0]*J[oó]h))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["John"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
J(?:oh(?:annesarguðspjall|n)?|óh(?:annesarguðspjall)?)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Acts"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:Acts|Post(?:ulasagan)?)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Rom"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:Br[eé]f[\s\xa0]*P(?:[aá]ls[\s\xa0]*til[\s\xa0]*R(?:[oó]mverja))|R[oó]m(?:verjabr(?:[eé]fið)?))|R(?:[oó]m)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["2Cor"]
regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
(?:S(?:[ií]ðara[\s\xa0]*(?:br(?:[eé]f[\s\xa0]*P(?:[aá]ls[\s\xa0]*til[\s\xa0]*Kori(?:ntumanna)?))|K[oó]rintubr(?:[eé]f)))|II(?:\.[\s\xa0]*Kor|[\s\xa0]*Kor)|2(?:\.[\s\xa0]*Kor|[\s\xa0]*Kor|Cor))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["1Cor"]
regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
(?:Fyrra[\s\xa0]*(?:br(?:[eé]f[\s\xa0]*P(?:[aá]ls[\s\xa0]*til[\s\xa0]*Korin(?:tumanna)?))|Korintubr[eé]f)|I(?:\.[\s\xa0]*Kor|[\s\xa0]*Kor)|1(?:\.[\s\xa0]*Kor|[\s\xa0]*Kor|Cor))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Gal"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:Br[eé]f[\s\xa0]*P(?:[aá]ls[\s\xa0]*til[\s\xa0]*Galatamanna)|Gal(?:atabr[eé]fið)?)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Eph"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:Br[eé]f[\s\xa0]*P(?:[aá]ls[\s\xa0]*til[\s\xa0]*Efesusmanna)|E(?:ph|f(?:esusbr[eé]fið)?))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Phil"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:Br[eé]f[\s\xa0]*P(?:[aá]ls[\s\xa0]*til[\s\xa0]*Filipp(?:[ií]manna?))|Phil|Fil(?:ipp[ií]br(?:[eé]fið))?)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Col"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:Br[eé]f[\s\xa0]*P(?:[aá]ls[\s\xa0]*til[\s\xa0]*K(?:[oó]lossumanna?))|Col|K[oó]l(?:[ou]ssubr(?:[eé]fið)?))|K(?:[oó]l)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["2Thess"]
regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
(?:S[ií]ðara[\s\xa0]*(?:br(?:[eé]f[\s\xa0]*P(?:[aá]ls[\s\xa0]*til[\s\xa0]*Þess(?:alon(?:[ií]kumanna)?))|Þessalon[ií]kubr(?:[eé]f)))|II(?:\.[\s\xa0]*Þess|[\s\xa0]*Þess)|2(?:\.[\s\xa0]*Þess|[\s\xa0]*Þess|Thess))|S[ií]ðara[\s\xa0]*(?:br(?:[eé]f[\s\xa0]*P(?:[aá]ls[\s\xa0]*til[\s\xa0]*Þess)|Þessalon[ií]kubr(?:[eé]f)))|S[ií]ðara[\s\xa0]*Þessalon(?:[ií]kubr(?:[eé]f))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["1Thess"]
regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-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]*T[ií]m|[\s\xa0]*T[ií]m|Tim))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Titus"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:Br[eé]f[\s\xa0]*P(?:[aá]ls[\s\xa0]*til[\s\xa0]*T(?:[ií]tusar))|T(?:it(?:us(?:arbr(?:[eé]f(?:ið)?))?)?|ít(?:usarbr(?:[eé]f(?:ið)?))?))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Phlm"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:Br[eé]f[\s\xa0]*P(?:[aá]ls[\s\xa0]*til[\s\xa0]*F(?:[ií]lemons))|F[ií]l(?:emonsbr(?:[eé]fið|m))|Phlm)|F(?:[ií]lm)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Heb"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:Br[eé]fið[\s\xa0]*til[\s\xa0]*Hebrea|Heb(?:reabr[eé]fið)?)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Jas"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:Hið[\s\xa0]*almenna[\s\xa0]*br[eé]f[\s\xa0]*Jakobs|Ja(?:k(?:obsbr[eé]fið)?|s))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["2Pet"]
regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
(?:S[ií]ðara[\s\xa0]*(?:almenna[\s\xa0]*br(?:[eé]f[\s\xa0]*P(?:[eé]turs)|P[eé]tursbr(?:[eé]f)))|II(?:\.[\s\xa0]*P[eé]t|[\s\xa0]*P[eé]t)|2(?:\.[\s\xa0]*P[eé]t|[\s\xa0]*P[eé]t|Pet))|S[ií]ðara[\s\xa0]*P(?:[eé]tursbr(?:[eé]f))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["1Pet"]
regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
(?:Fyrra[\s\xa0]*(?:almenna[\s\xa0]*br[eé]f[\s\xa0]*P(?:[eé]turs)|P[eé]tursbr(?:[eé]f))|I(?:\.[\s\xa0]*P[eé]t|[\s\xa0]*P[eé]t)|1(?:\.[\s\xa0]*P[eé]t|[\s\xa0]*P[eé]t|Pet))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Jude"]
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
(?:Hið[\s\xa0]*almenna[\s\xa0]*br[eé]f[\s\xa0]*J(?:[uú]dasar)|J(?:ud(?:asarbr(?:[eé]f(?:ið)?)|e)?|úd(?:asarbr(?:[eé]f(?:ið)?))?))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Tob"]
apocrypha: true
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
T(?:ób[ií]tsb(?:[oó]k)|ob[ií]tsb(?:[oó]k)?)|Tob
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Jdt"]
apocrypha: true
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
J(?:[uú]d(?:(?:[ií]tarb(?:[oó]k)|t))|dt)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Bar"]
apocrypha: true
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
Bar[uú]ksb(?:[oó]k)?|Bar
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["Sus"]
apocrypha: true
regexp: ///(^|#{bcv_parser::regexps.pre_book})(
S(?:úsanna|us(?:anna)?)
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["2Macc"]
apocrypha: true
regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
(?:[OÖ]nnur[\s\xa0]*Makkabeab(?:[oó]k)|II(?:\.[\s\xa0]*Makk|[\s\xa0]*Makk)|2(?:\.[\s\xa0]*Makk|[\s\xa0]*Makk|Macc))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["3Macc"]
apocrypha: true
regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
(?:Þriðja[\s\xa0]*Makkabeab[oó]k|III(?:\.[\s\xa0]*Makk|[\s\xa0]*Makk)|3(?:\.[\s\xa0]*Makk|[\s\xa0]*Makk|Macc))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["4Macc"]
apocrypha: true
regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
(?:Fj[oó]rða[\s\xa0]*Makkabeab(?:[oó]k)|IV(?:\.[\s\xa0]*Makk|[\s\xa0]*Makk)|4(?:\.[\s\xa0]*Makk|[\s\xa0]*Makk|Macc))
)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)()\[\]/"'\*=~\-\u2013\u2014])|$)///gi
,
osis: ["1Macc"]
apocrypha: true
regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
(?:Fyrsta[\s\xa0]*Makkabeab[oó]k|I(?:\.[\s\xa0]*Makk|[\s\xa0]*Makk)|1(?:\.[\s\xa0]*Makk|[\s\xa0]*Makk|Macc))
)(?:(?=[\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"