import re
regtitlepreprocess = re.compile(r'([^<]*)',re.MULTILINE | re.DOTALL)
regdeflist = re.compile(r'(\n;[^:\n]*:)')
regsentinitialbracket = re.compile(r'([^M][^rs]\.)\s+(\[\[([^|\]]+\|)?([A-Z])([^|\]]+)\]\])',re.MULTILINE | re.DOTALL)
regneosfirst = re.compile(r'()+\s*()+\s*()*\s?', re.MULTILINE | re.DOTALL)
regneosfinal = re.compile(r'()*\s*()+\s*()+\s?', re.MULTILINE | re.DOTALL)
regneosremove = re.compile(r'', re.MULTILINE | re.DOTALL)
regeos = re.compile(r'\s?', re.MULTILINE | re.DOTALL)
regeosTwoOrMore = re.compile(r'((\s*)|(\s?\n)){3-10}', re.MULTILINE | re.DOTALL)
regredirect = re.compile(r'#[rR][eE][dD][iI][rR][eE][cC][tT]\s?\[\[([^\]]+)\]\]', re.MULTILINE | re.DOTALL )
regcurly1 = re.compile(r'(\({{[^}^{]*?}}\)|\'*{{[^}^{]*?}}\'*)', re.MULTILINE | re.DOTALL)
regwikitable1 = re.compile(r'{[^}]*?class="?wikitable"?[^}]*?}', re.MULTILINE | re.DOTALL)
regwikitable2 = re.compile(r'[^{]{\|[^\\][^}^{]*?}', re.MULTILINE | re.DOTALL)
regtablehardcode = re.compile('{\|\sclass=\"wikitable\"\s!English\s\|\|\sFrench\s\|\|\sIPA pronunciation\s\(Canadian accent\).*?\|}', re.MULTILINE | re.DOTALL)
regeos = re.compile(r'\s?', re.MULTILINE | re.DOTALL)
regbr = re.compile(r'
', re.MULTILINE | re.DOTALL)
regref = re.compile(r'<[Rr]ef.*?/[Rr]ef>', re.MULTILINE | re.DOTALL)
regref2 = re.compile(r'<[Rr]ef[^>]*?/>', re.MULTILINE | re.DOTALL)
regcomment = re.compile(r'', re.MULTILINE | re.DOTALL)
regblockquote = re.compile(r'
(.*?)
',re.MULTILINE | re.DOTALL)
regsource = re.compile(r')', re.MULTILINE | re.DOTALL)
regremoveeosinsource2 = re.compile(r'()', re.MULTILINE | re.DOTALL)
regremoveeosincode2 = re.compile(r'()', re.MULTILINE | re.DOTALL)
regremoveeosincode = re.compile(r'(
(.*)*?(.*?)', re.MULTILINE | re.DOTALL)
regremoveeosinnowiki = re.compile(r'((.*)*?(.*?)', re.MULTILINE | re.DOTALL)
#regdigitandbold = re.compile(r'(^:"[0-9][0-9]\.\s+(?=\'))', re.MULTILINE | re.DOTALL)
#regcurly1 = re.compile(r'{{?[^}^{]*?}?}', re.MULTILINE | re.DOTALL)
#regsource1 = re.compile(r'