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]
				  | t[íi]tulo (?! [a-z] )		#could be followed by a number
				  | e(?!#{bcv_parser::regexps.space}+sig) | e#{bcv_parser::regexps.space}+sig | vers[íi]culos | cap[íi]tulos | vers[íi]culo | cap[íi]tulo | caps | vers | cap | ver | vss | vs | vv | á | 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* t[íi]tulo
	| \d \W* e#{bcv_parser::regexps.space}+sig (?: [\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 = "(?:Primeir[ao]|1[ao]?|I)\\.?#{bcv_parser::regexps.space}*"
bcv_parser::regexps.second = "(?:Segund[ao]|2[ao]?|II)\\.?#{bcv_parser::regexps.space}*"
bcv_parser::regexps.third = "(?:Terceir[ao]|3[ao]?|III)\\.?#{bcv_parser::regexps.space}*"
bcv_parser::regexps.range_and = "(?:[&\u2013\u2014-]|e(?!#{bcv_parser::regexps.space}+sig)|á)"
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: ///(^|#{bcv_parser::regexps.pre_book})(
		G(?:[eéê]n(?:esis)?)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Exod"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		(?:Éxodo|(?:[EÊ]x(?:d|o(?:do?)?)?))
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Bel"]
		apocrypha: true
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		Bel(?:[\s\xa0]*e[\s\xa0]*o[\s\xa0]*[Dd]rag(?:[aã]o))?
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Lev"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		L(?:e(?:v(?:[ií]ticos?)?)?|v)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Num"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		N(?:m|(?:[uú](?:m(?:eros)?)?))
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Sir"]
		apocrypha: true
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		(?:Eclesi[aá]stico|Sir(?:[aá]cida)?)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Wis"]
		apocrypha: true
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		(?:Wis|S(?:ab(?:edoria(?:[\s\xa0]*de[\s\xa0]*Salom[aã]o)?)?|b))
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Lam"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		Lam(?:enta(?:[cç](?:ôes[\s\xa0]*de[\s\xa0]*Jeremias|(?:[oõ]es(?:[\s\xa0]*de[\s\xa0]*Jeremias)?))))?
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["EpJer"]
		apocrypha: true
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		(?:Cart(?:a[\s\xa0]*de[\s\xa0]*Jeremias|\.[\s\xa0]*Jer|[\s\xa0]*Jer)|EpJer)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Rev"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		(?:Rev|Ap(?:oc(?:alipse(?:[\s\xa0]*de[\s\xa0]*(?:S[aã]o[\s\xa0]*Jo(?:[aã]o)|Jo[aã]o))?)?|c)?)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["PrMan"]
		apocrypha: true
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		Pr(?:ece[\s\xa0]*de[\s\xa0]*Manass[eé]s|[\s\xa0]*Man|Man)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Deut"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		D(?:eu(?:t(?:eron[oóô]mio)?)?|t)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Josh"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		J(?:os(?:u[eé]|h)?|s)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Judg"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		J(?:u(?:dg|(?:[ií]z(?:es)?))|z)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Ruth"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		R(?:t|u(?:t[eh]?)?)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["2Esd"]
		apocrypha: true
		regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
		(?:Segund[ao][\s\xa0]*Esdras|II(?:\.[\s\xa0]*Esdras|[\s\xa0]*Esdras)|2(?:\.[\s\xa0]*Esdras|(?:[ao](?:\.[\s\xa0]*Esdras|[\s\xa0]*Esdras))|[\s\xa0]*Es(?:d(?:ras)?)?|Esd))
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["1Esd"]
		apocrypha: true
		regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
		(?:Primeir[ao][\s\xa0]*Esdras|I(?:\.[\s\xa0]*Esdras|[\s\xa0]*Esdras)|1(?:\.[\s\xa0]*Esdras|(?:[ao](?:\.[\s\xa0]*Esdras|[\s\xa0]*Esdras))|[\s\xa0]*Es(?:d(?:ras)?)?|Esd))
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Isa"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		Is(?:a(?:[ií]as)?)?
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["2Sam"]
		regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
		(?:Segund(?:[ao][\s\xa0]*(?:Reinos|Samuel))|II(?:\.[\s\xa0]*(?:Reinos|Samuel)|[\s\xa0]*(?:Reinos|Samuel))|2(?:\.[\s\xa0]*(?:Reinos|Samuel)|(?:[ao](?:\.[\s\xa0]*(?:Reinos|Samuel)|[\s\xa0]*(?:Reinos|Samuel)))|Sam|[\s\xa0]*(?:Reinos|S(?:a(?:m(?:uel)?)?|m)?)))
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["1Sam"]
		regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
		(?:Primeir(?:[ao][\s\xa0]*(?:Reinos|Samuel))|I(?:\.[\s\xa0]*(?:Reinos|Samuel)|[\s\xa0]*(?:Reinos|Samuel))|1(?:\.[\s\xa0]*(?:Reinos|Samuel)|(?:[ao](?:\.[\s\xa0]*(?:Reinos|Samuel)|[\s\xa0]*(?:Reinos|Samuel)))|Sam|[\s\xa0]*(?:Reinos|S(?:a(?:m(?:uel)?)?|m)?)))
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["2Kgs"]
		regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
		(?:Quart[ao][\s\xa0]*Reinos|Segund[ao][\s\xa0]*Reis|4(?:\.[\s\xa0]*Reinos|(?:[ao](?:\.[\s\xa0]*Reinos|[\s\xa0]*Reinos))|[\s\xa0]*Reinos)|I(?:V(?:\.[\s\xa0]*Reinos|[\s\xa0]*Reinos)|I(?:\.[\s\xa0]*Reis|[\s\xa0]*Reis))|2(?:\.[\s\xa0]*Reis|(?:[ao](?:\.[\s\xa0]*Reis|[\s\xa0]*Reis))|Kgs|[\s\xa0]*R(?:e(?:is)?)?))
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["1Kgs"]
		regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
		(?:Terceir[ao][\s\xa0]*Reinos|Primeir[ao][\s\xa0]*Reis|3(?:\.[\s\xa0]*Reinos|(?:[ao](?:\.[\s\xa0]*Reinos|[\s\xa0]*Reinos))|[\s\xa0]*Reinos)|I(?:II(?:\.[\s\xa0]*Reinos|[\s\xa0]*Reinos)|\.[\s\xa0]*Reis|[\s\xa0]*Reis)|1(?:\.[\s\xa0]*Reis|(?:[ao](?:\.[\s\xa0]*Reis|[\s\xa0]*Reis))|Kgs|[\s\xa0]*R(?:e(?:is)?)?))
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["2Chr"]
		regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
		(?:Segund[ao][\s\xa0]*Cr(?:[oô]nicas)|II(?:\.[\s\xa0]*Cr[oô]nicas|[\s\xa0]*Cr[oô]nicas)|2(?:\.[\s\xa0]*Cr[oô]nicas|[ao](?:\.[\s\xa0]*Cr(?:[oô]nicas|[\s\xa0]*Cr[oô]nicas))|[\s\xa0]*Cr(?:[oô](?:n(?:icas)?)?)?|Chr))|2[ao][\s\xa0]*Cr(?:[oô]nicas)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["1Chr"]
		regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
		(?:Primeir[ao][\s\xa0]*Cr(?:[oô]nicas)|I(?:\.[\s\xa0]*Cr[oô]nicas|[\s\xa0]*Cr[oô]nicas)|1(?:\.[\s\xa0]*Cr[oô]nicas|[ao](?:\.[\s\xa0]*Cr(?:[oô]nicas|[\s\xa0]*Cr[oô]nicas))|[\s\xa0]*Cr(?:[oô](?:n(?:icas)?)?)?|Chr))|1[ao][\s\xa0]*Cr(?:[oô]nicas)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Ezra"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		E(?:zra|sd(?:r(?:as)?)?)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Neh"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		Ne(?:emias|h)?
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["GkEsth"]
		apocrypha: true
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		(?:Est(?:er[\s\xa0]*(?:\([Gg]rega\)|[Gg]rega)|[\s\xa0]*\(Gr\))|GkEsth)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Esth"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		Est(?:er|h)?
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Job"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		J(?:ob|ó)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["PrAzar"]
		apocrypha: true
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		(?:Sal(?:mo[\s\xa0]*de[\s\xa0]*Azarias|[\s\xa0]*Azar)|PrAzar)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Ps"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		(?:Ps|S(?:al(?:mos?)?|l))
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Prov"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		P(?:r(?:o(?:v(?:[eé]rbios)?)?|v)?|v)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Eccl"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		(?:Co[eé]let|Ec(?:cl|l(?:esiastes)?))
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["SgThree"]
		apocrypha: true
		regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
		(?:SgThree|C(?:[aâ]ntico[\s\xa0]*dos[\s\xa0]*(?:Tr(?:[eê]s[\s\xa0]*Jovens|3[\s\xa0]*Jovens))|3J))|C(?:[aâ]ntico[\s\xa0]*dos[\s\xa0]*3[\s\xa0]*Jovens)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Song"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		(?:Song|C(?:ant(?:ares[\s\xa0]*de[\s\xa0]*Salom[aã]o|ico(?:s[\s\xa0]*dos[\s\xa0]*C[aâ]nticos|[\s\xa0]*(?:Superlativo|d(?:os[\s\xa0]*C[aâ]nticos|e[\s\xa0]*Salom[aã]o))))?|ânt(?:ico(?:s[\s\xa0]*dos[\s\xa0]*C[aâ]nticos|[\s\xa0]*(?:Superlativo|d(?:os[\s\xa0]*C[aâ]nticos|e[\s\xa0]*Salom[aã]o))))?|nt|t))|C(?:ânticos|ant(?:icos|ares))
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Jer"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		J(?:e(?:r(?:emias)?)?|r)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Ezek"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		Ez(?:e(?:k|q(?:uiel)?)?)?
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Dan"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		D(?:a(?:n(?:iel)?)?|n)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Hos"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		(?:Hos|Os(?:[eé]ias)?)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Joel"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		J(?:oel|l)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Amos"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		Am(?:[oó]s)?
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Obad"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		(?:Abd(?:ias)?|Ob(?:a(?:d(?:ias)?)?|d)?)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Jonah"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		J(?:on(?:a[hs])?|n)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Mic"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		M(?:i(?:c|q(?:u[eé]ias)?)|q)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Nah"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		Na(?:um|h)?
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Hab"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		Hab(?:acu(?:que|c))?
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Zeph"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		(?:Zeph|S(?:of(?:onias)?|f))
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Hag"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		(?:Hag|Ag(?:eu)?)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Zech"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		Z(?:ech|ac(?:arias)?|c)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Mal"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		M(?:al(?:aquias)?|l)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Matt"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		M(?:at(?:eus|t)?|t)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["1Macc"]
		apocrypha: true
		regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
		(?:Primeir[ao][\s\xa0]*Macabeus|I(?:\.[\s\xa0]*Macabeus|[\s\xa0]*Macabeus)|1(?:\.[\s\xa0]*Macabeus|(?:[ao](?:\.[\s\xa0]*Macabeus|[\s\xa0]*Macabeus))|Macc|[\s\xa0]*M(?:ac(?:abeus)?|c)?))
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["2Macc"]
		apocrypha: true
		regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
		(?:Segund[ao][\s\xa0]*Macabeus|II(?:\.[\s\xa0]*Macabeus|[\s\xa0]*Macabeus)|2(?:\.[\s\xa0]*Macabeus|(?:[ao](?:\.[\s\xa0]*Macabeus|[\s\xa0]*Macabeus))|Macc|[\s\xa0]*M(?:ac(?:abeus)?|c)?))
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["3Macc"]
		apocrypha: true
		regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
		(?:Terceir[ao][\s\xa0]*Macabeus|III(?:\.[\s\xa0]*Macabeus|[\s\xa0]*Macabeus)|3(?:\.[\s\xa0]*Macabeus|(?:[ao](?:\.[\s\xa0]*Macabeus|[\s\xa0]*Macabeus))|Macc|[\s\xa0]*M(?:ac(?:abeus)?|c)?))
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["4Macc"]
		apocrypha: true
		regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
		(?:Quart[ao][\s\xa0]*Macabeus|IV(?:\.[\s\xa0]*Macabeus|[\s\xa0]*Macabeus)|4(?:\.[\s\xa0]*Macabeus|(?:[ao](?:\.[\s\xa0]*Macabeus|[\s\xa0]*Macabeus))|Macc|[\s\xa0]*M(?:ac(?:abeus)?|c)?))
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Mark"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		M(?:ar(?:cos|k)|rc|c)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Luke"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		L(?:u(?:ke|c(?:as)?)|c)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["1John"]
		regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
		(?:Primeir[ao][\s\xa0]*Jo(?:[aã]o)|I(?:\.[\s\xa0]*Jo[aã]o|[\s\xa0]*Jo[aã]o)|1(?:\.[\s\xa0]*Jo[aã]o|[ao](?:\.[\s\xa0]*Jo(?:[aã]o|[\s\xa0]*Jo[aã]o))|John|[\s\xa0]*J(?:o(?:[aã]o)?)?))|1[ao][\s\xa0]*Jo(?:[aã]o)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["2John"]
		regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
		(?:Segund[ao][\s\xa0]*Jo(?:[aã]o)|II(?:\.[\s\xa0]*Jo[aã]o|[\s\xa0]*Jo[aã]o)|2(?:\.[\s\xa0]*Jo[aã]o|[ao](?:\.[\s\xa0]*Jo(?:[aã]o|[\s\xa0]*Jo[aã]o))|John|[\s\xa0]*J(?:o(?:[aã]o)?)?))|2[ao][\s\xa0]*Jo(?:[aã]o)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["3John"]
		regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
		(?:Terceir[ao][\s\xa0]*Jo(?:[aã]o)|III(?:\.[\s\xa0]*Jo[aã]o|[\s\xa0]*Jo[aã]o)|3(?:\.[\s\xa0]*Jo[aã]o|[ao](?:\.[\s\xa0]*Jo(?:[aã]o|[\s\xa0]*Jo[aã]o))|John|[\s\xa0]*J(?:o(?:[aã]o)?)?))|3[ao][\s\xa0]*Jo(?:[aã]o)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["John"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		Jo(?:[aã]o|hn)?
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Acts"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		A(?:cts|t(?:os(?:[\s\xa0]*dos[\s\xa0]*Ap[oó]stolos)?)?)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Rom"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		R(?:m|o(?:m(?:anos)?)?)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["2Cor"]
		regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
		(?:Segund[ao][\s\xa0]*Cor(?:[ií]ntios)|II(?:\.[\s\xa0]*Cor[ií]ntios|[\s\xa0]*Cor[ií]ntios)|2(?:\.[\s\xa0]*Cor[ií]ntios|[ao](?:\.[\s\xa0]*Cor(?:[ií]ntios|[\s\xa0]*Cor[ií]ntios))|[\s\xa0]*Co(?:r(?:[ií]ntios)?)?|Cor))|2[ao][\s\xa0]*Cor(?:[ií]ntios)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["1Cor"]
		regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
		(?:Primeir[ao][\s\xa0]*Cor(?:[ií]ntios)|I(?:\.[\s\xa0]*Cor[ií]ntios|[\s\xa0]*Cor[ií]ntios)|1(?:\.[\s\xa0]*Cor[ií]ntios|[ao](?:\.[\s\xa0]*Cor(?:[ií]ntios|[\s\xa0]*Cor[ií]ntios))|[\s\xa0]*Co(?:r(?:[ií]ntios)?)?|Cor))|1[ao][\s\xa0]*Cor(?:[ií]ntios)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Gal"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		G(?:[aá]l(?:atas)?)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Eph"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		E(?:ph|f(?:[eé]sios)?)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Phil"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		(?:Phil|F(?:il(?:ipenses)?|l))
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Col"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		C(?:ol(?:ossenses)?|l)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["2Thess"]
		regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
		(?:Segund[ao][\s\xa0]*Tessalonicenses|II(?:\.[\s\xa0]*Tessalonicenses|[\s\xa0]*Tessalonicenses)|2(?:\.[\s\xa0]*Tessalonicenses|(?:[ao](?:\.[\s\xa0]*Tessalonicenses|[\s\xa0]*Tessalonicenses))|Thess|[\s\xa0]*T(?:ess(?:alonicenses)?|s)))
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["1Thess"]
		regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
		(?:Primeir[ao][\s\xa0]*Tessalonicenses|I(?:\.[\s\xa0]*Tessalonicenses|[\s\xa0]*Tessalonicenses)|1(?:\.[\s\xa0]*Tessalonicenses|(?:[ao](?:\.[\s\xa0]*Tessalonicenses|[\s\xa0]*Tessalonicenses))|Thess|[\s\xa0]*T(?:ess(?:alonicenses)?|s)))
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["2Tim"]
		regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
		(?:Segund[ao][\s\xa0]*Tim(?:[oó]teo)|II(?:\.[\s\xa0]*Tim[oó]teo|[\s\xa0]*Tim[oó]teo)|2(?:\.[\s\xa0]*Tim[oó]teo|[ao](?:\.[\s\xa0]*Tim(?:[oó]teo|[\s\xa0]*Tim[oó]teo))|[\s\xa0]*Ti(?:m(?:[oó]teo)?)?|Tim))|2[ao][\s\xa0]*Tim(?:[oó]teo)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["1Tim"]
		regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
		(?:Primeir[ao][\s\xa0]*Tim(?:[oó]teo)|I(?:\.[\s\xa0]*Tim[oó]teo|[\s\xa0]*Tim[oó]teo)|1(?:\.[\s\xa0]*Tim[oó]teo|[ao](?:\.[\s\xa0]*Tim(?:[oó]teo|[\s\xa0]*Tim[oó]teo))|[\s\xa0]*Ti(?:m(?:[oó]teo)?)?|Tim))|1[ao][\s\xa0]*Tim(?:[oó]teo)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Titus"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		Tit(?:us|o)?
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Phlm"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		(?:Phlm|F(?:il(?:emo[mn]|émon)|lmn?|mn))
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Heb"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		Heb(?:reus)?
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Jas"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		(?:Jas|T(?:iago|g))
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["2Pet"]
		regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
		2Pet|(?:Segund[ao][\s\xa0]*Pedro|II(?:\.[\s\xa0]*Pedro|[\s\xa0]*Pedro)|2(?:\.[\s\xa0]*Pedro|(?:[ao](?:\.[\s\xa0]*Pedro|[\s\xa0]*Pedro))|[\s\xa0]*Pe(?:d(?:ro)?)?))
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["1Pet"]
		regexp: ///(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿ])(
		1Pet|(?:Primeir[ao][\s\xa0]*Pedro|I(?:\.[\s\xa0]*Pedro|[\s\xa0]*Pedro)|1(?:\.[\s\xa0]*Pedro|(?:[ao](?:\.[\s\xa0]*Pedro|[\s\xa0]*Pedro))|[\s\xa0]*Pe(?:d(?:ro)?)?))
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Jude"]
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		Jud(?:as|e)?
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Tob"]
		apocrypha: true
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		Tob(?:ias)?
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Jdt"]
		apocrypha: true
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		J(?:udite|dt)
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Bar"]
		apocrypha: true
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		Bar(?:u(?:que|[ck]))?
			)(?:(?=[\d\s\xa0.:,;\x1e\x1f&\(\)（）\[\]/"'\*=~\-\u2013\u2014])|$)///gi
	,
		osis: ["Sus"]
		apocrypha: true
		regexp: ///(^|#{bcv_parser::regexps.pre_book})(
		(?:Hist[oó]ria[\s\xa0]*de[\s\xa0]*Susana|Sus(?:ana)?)
			)(?:(?=[\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"
