User:Reguyla/Code 1

WikiFunctions.Parse.HideText ht = new WikiFunctions.Parse.HideText(true, false, true); public string ProcessArticle(string ArticleText, string ArticleTitle, int wikiNamespace, out string Summary, out bool Skip) { Skip = false; Summary = ""; ArticleText = ht.Hide(ArticleText); // //Cleanup redirects ArticleText = Regex.Replace(ArticleText, @"{{\s*(\.38 Calibre)\s*([\}{<\n])", "{{.38 Caliber$2", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"(?i){{\s*(campaignbox polish\–soviet war|campaignbox polish\-soviet war)\s*([\|}{<\n])", "{{Campaignbox Polish–Soviet War$2", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"{{\s*(Commonscat|Commons[ ]+cat|Commonscat\-inline|commons category inline‏‎|Commons[ _]+category)\s*([\|}{<\n])", "{{Commons category$2", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"{{\s*(Commons|Commons\-inline‏‎)\s*([\|}{<\n])", "{{Commons$2", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Dd]ab|[Dd]isambig)\s*([\|}{<\n])", "{{Disambiguation$2", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Ii]nfobox[ _]+Person|Infobox[ _]+college[ _]+coach|Infobox[ _]+cricketer|Infobox[ _]+criminal|Infobox[ _]+engineer|Infobox[ _]+gridiron[ _]+football[ _]+person|Infobox[ _]+MLB[ _]+player|Infobox[ _]+musical[ _]+artist|Infobox[ _]+NFL[ _]+player|Infobox[ _]+noble|Infobox[ _]+saint|Infobox[ _]+scientist|Infobox[ _]+spy|Infobox[ _]+writer)\s*([\}{<\n])", "{{Infobox person$2", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Ii]nfobox[ _]+[Cc]ommand[ _]+[Ss]tructure|[Cc]ommand[ _]+[Ss]tructure)\s*([\}{<\n])", "{{Infobox command structure$2", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Ii]nfobox[ _]+[H|h]istoric [S|s]ite)\s*([\}{<\n])", "{{Infobox historic site$2", RegexOptions.IgnoreCase); ArticleText = Tools.NestedTemplateRegex("Iafsqns").Replace(ArticleText, "{{Indian Air Force squadrons}}"); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Ii]nfobox[ _]+[W|w]orld[ _]+[H|h]eritage[ _]+[S|s]ite)\s*([\}{<\n])", "{{Infobox world heritage site$2", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Ii]nfobox[ ]+University|[Ii]nfobox[ ]+[Uu]iversity|[Ii]nfaobox[ ]+[Uu]iversity)\s*([\|}{<\n])", "{{Infobox university$2", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"{{\s*(London[ ]+Gazette|LondonGazette)\s*([\|}{<\n])", "{{London Gazette$2", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"{{\s*(End[ _]+box)\s*([\}{<\n])", "{{S-end$2", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"{{\s*(Organisation of the Ottoman Empire)\s*([\|}{<\n])", "{{Organization of the Ottoman Empire$2", RegexOptions.IgnoreCase); // ArticleText = Regex.Replace(ArticleText, @"(?i){{\s*(no (?:footnates|ref|references|sources|)|un(?:ref|referenced|referenced stub|)|cn|)\s*([\|}{<\n])", "{{Unreferenced$2", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"(?i){{\s*(usrepsuccessionbox|usrepsuccession box|u\.s\. representative box|usrsb)\s*([\}{<\n])", "{{USRepSuccessionBox$2", RegexOptions.IgnoreCase); // //Delete uneeded templates ArticleText = Regex.Replace(ArticleText, @"{{\s*(?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|)\s*}}", "", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"{{\s*((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|) history)\s*}}", "", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"{{\s*(Good[ _]+article|Featured[ _]+article|Featured[ _]+list|FA[ _]+link|Link[ _]+FA|Link[ _]+GA|Link[ _]+FL)(.*?)}}", "", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"{{\s*(Portal|Portalbar|Portalpar|Portalbox|Portal[ _]+bar|Portal[ _]+par|Portal[ _]+box)(.*?)}}", "", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"(?i){{\s*(advert|advert(?:isement)|all plot|buzzword|citation style|autobiography|citations broken|cite check|cleanup|coi|condense|confusing|context|copy(?:edit| edit)|criticism section|dead end|disputed|duplication|essay\-like|expert|expert(?:\-subject)|external (?:links)|fanpov|fansite|fiction|globalize|histinfo|howto|in\-universe|inadequate lead|inappropriate (?:person|tone|)|incoherent|incomplete|independent sources|inline|jargon|lead[ ]*(?:missing|rewrite|too long|too short)|like[ ]+resume|linkrot|misleading|missing information|more references|(?:more|no) footnotes|neutrality|notability|npov|nris\-only|(?:one |one)source|orphan|original research|over\-quotation|overly detailed|page numbers needed|peacock|plot|pov|primary(?: sources|)|prose|recentism|ref(?:improve| improve)|reorganisation|rewrite|self\-published|split\-apart|story|synthesis|technical|third\-party|tone|too few opinions|unbalanced|underlinked|undue|unreliable sources|Very long|weasel|wikify)(.*?)}}", ""); ArticleText = Regex.Replace(ArticleText, @"{{\s*(Engvarb|[Rr]oughtranslation)(.*?)}}", "", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Ee]xpand[ _]+(?:[Dd]utch|[Ff]rench|[Gg]erman|[Ii]talian|[Ll]anguage|[Pp]olish|[Rr]ussian|[Ss]panish|))(.*?)}}", "", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Uu]se[ _]+American[ _]+English|Use[ _]+Australian[ _]+English|Use[ _]+British[ _]+English|Use[ _]+British[ _]+\(Oxford\)[ _]+English|Use[ _]+Canadian[ _]+English|Use[ _]+Indian[ _]+English|Use[ ]+Irish[ ]+English|Use[ _]+New[ ]+Zealand[ _]+English|Use[ _]+Pakistani[ _]+English|Use[ _]+South[ ]+African[ _]+English)(.*?)}}", "", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"(?i){{\s*(Pp\-(?:blp|dispute|move|move\-dispute|move\-indef|move\-vandalism|pc1|protected|semi|semi\-blp|semi\-indef|semi\-protected|semi\-sock|template|\-template|usertalk|vandalism))(.*?)}}", ""); ArticleText = Regex.Replace(ArticleText, @"{{\s*(national register of historic places in (?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|idaho|illinois|indiana|iowa|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nevada|new (?:hampshire|jersey|mexico|york|)|north (?:carolina|dakota|)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:carolina|dakota|)|tennessee|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|))(.*?)}}", "", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"(?i){{\s*(aerospace defense command)(.*?)}}", "", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"(?i){{\s*(strategic air command)(.*?)}}", "", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"(?i){{\s*(usaaf (?:1st|2[d|nd]|3[d|rd]|4th|5th|6th|7th|8th|9th|10th|11th|12th|13th|14th|15th|) air force (?:UK|world war II|))(.*?)}}", "", RegexOptions.IgnoreCase); ArticleText = Tools.NestedTemplateRegex("13colonies").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("1973 Chilean coup d'état").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("2014 Crimean crisis").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("222remderivatives").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Adolph Hitler").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Aerobatics").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Aerospace industry in the United Kingdom").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Africa topic").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Air National Guard").Replace(ArticleText, ""); ArticleText = Regex.Replace(ArticleText, @"(?i){{\s*((?:aeg|aermacchi|aero vodochody|aichi|albatros|antonov|arado|armstrong whitworth|agustawestland|airbus|avia|avro|bae|beardmore|beriev|bernard|blackburn|blohm \& voss|boulton paul‏‎|breda|breguet|bristol|canadian vickers|caproni|casa|caudron|consolidated|convair|convair\/gd|curtiss|curtiss\-wright|dassault|de havilland|dewoitine|dornier|fairchild|fairey|farman|fiat‏‎|fma|focke\-wulf|friedrichshafen|gloster|gotha|grigorovich|hal|handley page|hanriot|hansa\-brandenburg|henschel|iai|ikarus|ilyushin|junkers|kamov|kawasaki|keystone|koolhoven|lavochkin|letov|lfg|lockheed|lockheed martin|loire|macchi|martin|mcdd|messerschmitt|miles|morane\-saulnier|nieuport|nord|northrop|piaggio|potez|pws|pzl|republic|saab|saro|savoia\-marchetti|short brothers|siemens\-schuckert|sikorsky|sopwith aviation company|spad|sud\/aérospatiale|sukhoi|supermarine|tupolev|valtion lentokonetehdas|vickers|vought|westland|yakovlev) aircraft)\s*}}", "", RegexOptions.IgnoreCase); ArticleText=Regex.Replace(ArticleText, @"(?i){{\s*(airports in (?:india|new south wales|norway|queensland|russia|the northern territory|))\s*}}", "", RegexOptions.IgnoreCase); ArticleText = Tools.NestedTemplateRegex("American Civil War").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Anarchism").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Anti-war").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Ancient Athenian statesmen").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Ancient Rome topics").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Apartheid").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Arab–Israeli diplomacy").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Argentine Military").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Armenian Fortresses").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Authority control").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Army Black Knights football").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Army Black Knights football coach navbox").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Army Black Knights football navbox").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Army Black Knights men's ice hockey navbox").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Asia topic").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Asia in topic").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Atlantic Hockeey").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Atlantic Hockeey").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Atlas rockets").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Austrian archdukes").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Ba'athism sidebar").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Baloch nationalism").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Band of Brothers (miniseries)").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Baseballstats").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Black Hawk War (1832)").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Boeing airliners").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Boeing support aircraft").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Bots").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Bottom").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("British Aviation Museums").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("British motor racing circuits").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("British princes").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("British princesses").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("British Shipbuilders evolution").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Bullpup Firearms").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Byzantine Empire topics").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("CA-Ministers of National Revenue").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("CA-Ministers of Transport").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("CA-Postmasters General").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("CA-Presidents of the Privy Council").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("CA-Secretaries of State of Canada").Replace(ArticleText, ""); ArticleText=Regex.Replace(ArticleText, @"(?i){{\s*((?:andrew johnson|arthur|benjamin harrison|clinton|coolidge|fd roosevelt|ford|garfield|grant|harding|jefferson|lincoln|nixon|pierce|truman|)[ ]* cabinet)\s*}}", "", RegexOptions.IgnoreCase); ArticleText = Tools.NestedTemplateRegex("Canadair").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Canadian history").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Canadian shipbuilders").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("CanMinFinance").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Castles in Latvia").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("catmore").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Central Intelligence Agency").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Cessna").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Characters in the Iliad").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Chemical agents").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Chemical warfare").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Chetniks in Macedonia").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("chinese").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Clan Campbel").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Client states of the Great French War").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Cold War Figures").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Cold War figures").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Conspiracy theories").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Cossacks").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("CSCabinet").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Cuba-United States relations").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Cultural Heritage of Serbia").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Cunard ships").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Current Members of the Canadian House of Commons").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Curtis aircraft").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Curtis-Wright aircraft").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Damascus").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Danish princes").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("DCIA").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Defunct airports in the United Kingdom").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Deputy DCIA").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Disasters").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Douglas airliners").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Dubious").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Eastern Bloc sidebar").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("EgyptPMs").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Emerging technologies").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Empires").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("English Heritage properties in North East England").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("EnigmaSeries").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Euromaidan").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Europe topic").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("European topic").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Expand section").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Expand-section").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Expendable launch systems").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("FAA-airport").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Fall of Communism").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Fascism").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Fascism sidebar").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Five Dynasties and Ten Kingdoms rulers").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Fix bunching").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("FixBunching").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("fixbunching").Replace(ArticleText, ""); ArticleText=Regex.Replace(ArticleText, @"(?i){{\s*(foriegn ministers of (?:france|russia and the soviet union))\s*}}", "", RegexOptions.IgnoreCase); ArticleText = Tools.NestedTemplateRegex("Foreign relations of the United States").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Former French colonies").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Four funnels").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("French Indochina").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("French literature sidebar").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("French Revolution navbox").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("French Revolution").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("GLONASS").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Template:Governors and Presidents of Pennsylvania").Replace(ArticleText, ""); ArticleText=Regex.Replace(ArticleText, @"(?i){{\s*(government of (?:alabama|alaska|american samoa|arizona|arkansas|california|connecticut|delaware|florida|georgia|gibraltar|guam|hawaii|illinois|indiana|iowa|kansas|kentucky|louisiana|maine|malta|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:hampshire|jersey|mexico|york)|north (?:carolina|dakota)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:carolina|dakota)|taganrog|tennessee|texas|vermont|virginia|utah|washington|west virginia|western australia|wisconsin|wyoming))\s*}}", "", RegexOptions.IgnoreCase); ArticleText=Regex.Replace(ArticleText, @"(?i){{\s*(governors of (?:alabama|alaska|american samoa|arizona|arkansas|california|connecticut|delaware|florida|georgia|gibraltar|guam|hawaii|illinois|indiana|iowa|kansas|kentucky|louisiana|maine|malta|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:hampshire|jersey|mexico|york)|north (?:carolina|dakota)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:carolina|dakota)|taganrog|tennessee|texas|vermont|virginia|utah|washington|west virginia|western australia|wisconsin|wyoming))\s*}}", "", RegexOptions.IgnoreCase); ArticleText = Tools.NestedTemplateRegex("Governors-General of New Zealand").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Grand Viziers of Ottoman Empire").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Grand Viziers of Ottoman Empire-Rise(1299-1453)").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Grand Viziers of Ottoman Empire-Growth (1453-1606)").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Grand Viziers of Ottoman Empire-Stagnation (1606-1699)").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Grand Viziers of Ottoman Empire-Decline (1699-1792)").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Grand Viziers of Ottoman Empire-Dissolution (1792-1922)").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Greece during World War I").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Greece during World War II").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Grumman aircraft").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("GuatemalaPres").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Harry S. Truman").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Hawker Aircraft aircraft").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Hazara people").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Helmets").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Hetmans GC").Replace(ArticleText, ""); ArticleText=Regex.Replace(ArticleText, @"(?i){{\s*(history of (?:afghanistan|albania|armenia|gibraltar|indonesia|japan|malaysia|mexico|romania|spain|ukraine|vietnam))\s*}}", "", RegexOptions.IgnoreCase); ArticleText = Tools.NestedTemplateRegex("Hitler's Cabinet").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("House of Plantagenet").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("IARepresentatives").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("ICC indictees (NavBox)").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Index footer").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Indian independence movement").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Indiana history").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Infantry Divisions of the Wehrmacht").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Infobox former country").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Infobox NRHP").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Infobox nrhp").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("International Criminal Court").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("International Criminal Law").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Islamism").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("IslamismNorthAfrica").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("IslamismSEA").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Israeli Immigrant Absorption Ministers").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Israeli Health Ministers").Replace(ArticleText, ""); ArticleText = Regex.Replace(ArticleText, @"(?i){{\s*(israeli ministers of (?:interior|transportation|))\s*}}", "", RegexOptions.IgnoreCase); ArticleText = Tools.NestedTemplateRegex("Iw-ref").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Jackson cabinet").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("JapanEmpireNavbox").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Japanese airports").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Japanese foreign ministers").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Jersey").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Jersey topics").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("John F. Kennedy").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Joseph Stalin").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Khazaria").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Kingdom of England").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Kings of Sparta").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Kings of the Isles").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Knives").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Kurdish–Turkish conflict").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("LARepresentatives").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Legislatures of the Americas").Replace(ArticleText, ""); ArticleText = Regex.Replace(ArticleText, @"(?i){{\s*(lieutenant governors of (?:alabama|alaska|american samoa|arizona|arkansas|california|connecticut|delaware|florida|georgia|gibraltar|guam|hawaii|illinois|indiana|iowa|kansas|kentucky|louisiana|maine|malta|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:hampshire|jersey|mexico|york)|north (?:carolina|dakota)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:carolina|dakota)|taganrog|tennessee|texas|vermont|virginia|utah|washington|west virginia|western australia|wisconsin|wyoming))\s*}}", "", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"(?i){{\s*(lists of (?:airports|aviation accidents and incidents‏‎|flags|russians|us presidents and vice presidents))\s*}}", "", RegexOptions.IgnoreCase); ArticleText = Tools.NestedTemplateRegex("LGBT").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("LNWR Ships").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Lviv").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Lockheed").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("MacedonKings").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Manhattan Project").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Mapuche").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Marshals of Italy").Replace(ArticleText, ""); ArticleText = Regex.Replace(ArticleText, @"(?i){{\s*(mayors of (?:atlanta|chicago|detroit|indianapolis|))\s*}}", "", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"(?i){{\s*(medal(?:bottom|bronze|competition|country|gold|silver|sport|tabletop|top))\s*}}", "", RegexOptions.IgnoreCase); ArticleText = Tools.NestedTemplateRegex("Merritt Island").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Mitsubishi aircraft").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Modern aerobatic teams").Replace(ArticleText, ""); ArticleText = Regex.Replace(ArticleText, @"(?i){{\s*(monarchs of (?:france|norway|portugal))\s*}}", "", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"(?i){{\s*((?:aragonese|english\, scottish and british‏‎|german|norway|serbian) monarchs)\s*}}", "", RegexOptions.IgnoreCase); ArticleText = Tools.NestedTemplateRegex("Mongol Empire").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Morefootnotes").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Mughal Empire").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Nagorno-Karabakh Conflict").Replace(ArticleText, ""); ArticleText = Regex.Replace(ArticleText, @"(?i){{\s*(nasa astronaut group ((\d{1,1})|(\d{1,2}))\|state\=autocollapse)}}", "", RegexOptions.IgnoreCase); ArticleText = Regex.Replace(ArticleText, @"(?i){{\s*(nasa astronaut group ((\d{1,1})|(\d{1,2})))}}", "", RegexOptions.IgnoreCase); ArticleText = Tools.NestedTemplateRegex("National Football Foundation Gold Medal Winners").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("National Register of Historic Places").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Navbox shipwrecks of New South Wales").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Law enforcement in India").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("National Women's Hall of Fame").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Nazism").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Nazism sidebar").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("NCAATeamFootballSeason").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("NevadaUSRepresentatives").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("New France").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("NewSouthWales Governors").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("New unreviewed article").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("NHSC").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Nigeria Abubakar Governors").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Nigeria Babangida Governors").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Nigeria Obasanjo Governors").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("NLLG").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("No footnotes").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("North America topic").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("North America in topic").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Northern Epirus").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("NRO Launches").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Ohio History Central").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("OR").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Or").Replace(ArticleText, ""); ArticleText = Regex.Replace(ArticleText, @"(?i){{\s*(orbital launches in (\d{1,4}))}}", "", RegexOptions.IgnoreCase); ArticleText = Tools.NestedTemplateRegex("Oregon Pioneer History").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Organization of the Ottoman Empire").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Sahaba").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Saskatchewan parks").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("P&O Cruises Ships").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Parliaments of England 1601–1679").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Pas-de-Calais communes").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("People involved in the Arab-Israeli conflict").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("People of Cao Wei").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("People of Eastern Wu").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("People of the Sengoku period").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("People of Shu").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("People who have walked on the Moon").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Persondata").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Pharaohs").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Philippine Revolution").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Piracy in Somalia").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Pirates").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Pirates of the Modern Age").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("PLH Recipients").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Plutarch").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("PMPortugal1910").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Polar exploration").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Political history of South Africa").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Pomeranian history").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Portal-inline").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Template:PortuguesePresidents").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Presidents of Brazil").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Presidents of the American Physical Society").Replace(ArticleText, ""); ArticleText=Regex.Replace(ArticleText, @"(?i){{\s*(protected areas of (?:alabama|alaska|arizona|arkansas|california|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|iowa|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|new (?:hampshire|jersey|mexico|york)|north (?:carolina|dakota)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:carolina|dakota)|tennessee|texas|vermont|virginia|utah|washington|west virginia|wisconsin|wyoming))\s*}}", "", RegexOptions.IgnoreCase); ArticleText=Regex.Replace(ArticleText, @"(?i){{\s*(prime ministers of (?:japan|poland))\s*}}", "", RegexOptions.IgnoreCase); ArticleText = Tools.NestedTemplateRegex("Prussian princes").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("PT-109").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Public art in London").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("QCLG").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("R caps").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Abbreviation").Replace(ArticleText, ""); ArticleText=Regex.Replace(ArticleText, @"(?i){{\s*(r from alternate (?:capitalisation|name|spelling))\s*}}", "", RegexOptions.IgnoreCase); ArticleText=Regex.Replace(ArticleText, @"(?i){{\s*(r from alternative (?:capitalisation|language|name|punctuation|spelling))\s*}}", "", RegexOptions.IgnoreCase); ArticleText=Regex.Replace(ArticleText, @"(?i){{\s*(r from (?:an incomplete name‏‎|disambiguation|former name|full name|historic name|incomplete name|incorrect name|merge|misspelling|modification|move|name with diacritics|name without diacritics|other capitalisation|other name|other spelling|shorter name|subtopic|title with diacritics|title without diacritics|trade name))\s*}}", "", RegexOptions.IgnoreCase); ArticleText = Tools.NestedTemplateRegex("R printworthy").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("R from title without diacritics").Replace(ArticleText, ""); ArticleText=Regex.Replace(ArticleText, @"(?i){{\s*(r to (?:alternate name name|disambig|disambiguation|disambiguation page|full name|list entry|other namespace|other spelling|related topics|section|short name|))\s*}}", "", RegexOptions.IgnoreCase); ArticleText = Tools.NestedTemplateRegex("R with possbilities").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("R with possibilities").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Rebellion and secession in Byzantium, 1182–1205").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Recreational dive sites").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Registered Historic Places").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Remington Cartridges Firearms").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("RGSPresidents").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Roman Emperors").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("RomanianPrimeMinisters").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Royal Governors of Chile").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Russia").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Russian Revolution 1917").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Russian grand dukes").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Sailing Vessels and Rigs").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Saskatchewan parks").Replace(ArticleText, ""); //ArticleText = Tools.NestedTemplateRegex("Search").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Singapore-designed weapons").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Sisterlinks").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Sister project links").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Smith & Wesson").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Socialist states").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Sources").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Soviet dissidents").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Space exploration lists and timelines").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Spaceflight lists and timelines").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Spaceport").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Spanish colonization of the Americas").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("SpeakerNYAssembly").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Spoken Wikipedia").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Start U.S. Supreme Court composition").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("State organisation of the Ottoman Empire").Replace(ArticleText, ""); ArticleText=Regex.Replace(ArticleText, @"(?i){{\s*((?:alabama|alaska|arizona|arkansas|california|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|iowa|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|new (?:hampshire|jersey|mexico|york)|north (?:carolina|dakota)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:carolina|dakota)|tennessee|texas|vermont|virginia|utah|washington|west virginia|wisconsin|wyoming) state parks)\s*}}", "", RegexOptions.IgnoreCase); ArticleText = Tools.NestedTemplateRegex("Steam Packet Ships").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Subject bar").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Superfund sites in the United States").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Surviving ocean going ships").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Tax resistance").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Telecommunications").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Territories of the British Empire").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("The Citadel, The Military College of South Carolina").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("The Moon").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("The Troubles").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Time Persons of the Year").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Time Persons of the Year 1951–1975").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Time Persons of the Year 1976–2000").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("TOCright").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Top").Replace(ArticleText, ""); ArticleText=Regex.Replace(ArticleText, @"(?i){{\s*((?:africa|africa in|albania|ancient greece|azerbaijan|brazil|byzantine empire|canada|colombia|cuba|dacia|dominican republic|estonia|europe|european|france|gibraltar|greece|han dynasty|history of turkey|india|iran|iraq|ireland|kingdom of kandy|lithuania|macedonia|malta|north america|north america in|north american|ottoman empire|philippines|portuguese monarchy|romanian|saudi arabia|south africa|south america|south sudan|sudan|tang dynasty|turkic|ukraine|united states|yemen) topic(?:s))\s*}}", "", RegexOptions.IgnoreCase); ArticleText = Tools.NestedTemplateRegex("Transport in China").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Tripoli").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Turkish nationalism").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Twenty-four meritorious officials of Lingyan Pavilion").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("UFOs").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("UKPrimeMinisters").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Unreferencedtes").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("United Nations").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("United States Constitution signatories").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("United States political divisions").Replace(ArticleText, ""); ArticleText=Regex.Replace(ArticleText, @"(?i){{\s*(United States presidential election\,[ ]*(\d{1,4}))\s*}}", "", RegexOptions.IgnoreCase); ArticleText = Tools.NestedTemplateRegex("US manned space programs").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("US Presidents").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("US history").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("USDemPresNominees").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Use dmy dates").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Use DMY dates").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Use mdy dates").Replace(ArticleText, ""); ArticleText=Regex.Replace(ArticleText, @"(?i){{\s*(usrep[ ]*(?:al|ak|az|ca|ct|de|fl|ga|hi|ia|id|il|in|ks|ky|la|ma|md|me|mi|mn|mo|ms|mt|nc|nd|ne|nj|nv|ny|oh|ok|or|pa|presnominees|ri|sc|sd|tn|tx|ut|va|vicepresnominees|vt|wa|wi|wv|wy))\s*}}", "", RegexOptions.IgnoreCase); ArticleText = Tools.NestedTemplateRegex("USSecState").Replace(ArticleText, ""); ArticleText=Regex.Replace(ArticleText, @"(?i){{\s*(ussen[ ]*(?:al|ak|az|ca|ct|de|fl|ga|hi|ia|id|il|in|ks|ky|la|ma|md|me|mi|mn|mo|ms|mt|nc|nd|ne|nj|nv|ny|oh|ok|or|pa|presprotemp|ri|sc|sd|tn|tx|ut|va|vt|wa|wi|wv|wy))\s*}}", "", RegexOptions.IgnoreCase); ArticleText = Tools.NestedTemplateRegex("USVicePresidents").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("VEpresidents").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Viceroys of New Spain").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Washington DC landmarks").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Weather box").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("White Star Line ships").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Who").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Wikiatlas").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Wikibooks").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Wikinews").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Wikinews-inline").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Wikinews category").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Wikipedia books").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Wikipedia-Books").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Wikivoyage").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Wikivoyage-inline").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Wikipedia-Books").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Wild West").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Winchester Cartridges Firearms").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Women in society sidebar").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("World Trade Organization").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Ws").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Yugoslav Axis collaborationism").Replace(ArticleText, ""); ArticleText = Tools.NestedTemplateRegex("Yugoslav wars").Replace(ArticleText, ""); // //Remove uneeded categories ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[Category\:Articles created via the Article Wizard\]\]", ""); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[Category\:Possible cut-and-paste moves\]\]", ""); // //Remove some empty cite parameters ArticleText = Regex.Replace(ArticleText, @"{{\s*([Cc])it(.*?)\|[ ]*(archive(?:date|url|name)|asin|at|author(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|bibcode|chapter(?:url)|coauthors|column|day[ _]+of[ _]+week|deadurl|display\-authors|doi|edit(?:ion|or)|editor(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|first|first(?:1|2|3|4)|format|id|issn|issue|language|last|last(?:authoramp)|lay(?:chapter|date|month|source|summary|url|year|)|lccn|location|month|oclc|orig(?:date|month|year)|others|p|page|page(?:s| number)|place|postscript|publisher|quote|ref|section|series|trans(?:\-title| chapter)|type|volume)[ ]*=\s*([\|}<\n])", "{{$1it$2$4"); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Cc])it(.*?)\|[ ]*(archive(?:date|url|name)|asin|at|author(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|bibcode|chapter(?:url)|coauthors|column|day[ _]+of[ _]+week|deadurl|display\-authors|doi|edit(?:ion|or)|editor(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|first|first(?:1|2|3|4)|format|id|issn|issue|language|last|last(?:authoramp)|lay(?:chapter|date|month|source|summary|url|year|)|lccn|location|month|oclc|orig(?:date|month|year)|others|p|page|page(?:s| number)|place|postscript|publisher|quote|ref|section|series|trans(?:\-title| chapter)|type|volume)[ ]*=\s*([\|}<\n])", "{{$1it$2$4"); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Cc])it(.*?)\|[ ]*(archive(?:date|url|name)|asin|at|author(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|bibcode|chapter(?:url)|coauthors|column|day[ _]+of[ _]+week|deadurl|display\-authors|doi|edit(?:ion|or)|editor(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|first|first(?:1|2|3|4)|format|id|issn|issue|language|last|last(?:authoramp)|lay(?:chapter|date|month|source|summary|url|year|)|lccn|location|month|oclc|orig(?:date|month|year)|others|p|page|page(?:s| number)|place|postscript|publisher|quote|ref|section|series|trans(?:\-title| chapter)|type|volume)[ ]*=\s*([\|}<\n])", "{{$1it$2$4"); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Cc])it(.*?)\|[ ]*(archive(?:date|url|name)|asin|at|author(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|bibcode|chapter(?:url)|coauthors|column|day[ _]+of[ _]+week|deadurl|display\-authors|doi|edit(?:ion|or)|editor(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|first|first(?:1|2|3|4)|format|id|issn|issue|language|last|last(?:authoramp)|lay(?:chapter|date|month|source|summary|url|year|)|lccn|location|month|oclc|orig(?:date|month|year)|others|p|page|page(?:s| number)|place|postscript|publisher|quote|ref|section|series|trans(?:\-title| chapter)|type|volume)[ ]*=\s*([\|}<\n])", "{{$1it$2$4"); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Cc])it(.*?)\|[ ]*(archive(?:date|url|name)|asin|at|author(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|bibcode|chapter(?:url)|coauthors|column|day[ _]+of[ _]+week|deadurl|display\-authors|doi|edit(?:ion|or)|editor(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|first|first(?:1|2|3|4)|format|id|issn|issue|language|last|last(?:authoramp)|lay(?:chapter|date|month|source|summary|url|year|)|lccn|location|month|oclc|orig(?:date|month|year)|others|p|page|page(?:s| number)|place|postscript|publisher|quote|ref|section|series|trans(?:\-title| chapter)|type|volume)[ ]*=\s*([\|}<\n])", "{{$1it$2$4"); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Cc])it(.*?)\|[ ]*(archive(?:date|url|name)|asin|at|author(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|bibcode|chapter(?:url)|coauthors|column|day[ _]+of[ _]+week|deadurl|display\-authors|doi|edit(?:ion|or)|editor(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|first|first(?:1|2|3|4)|format|id|issn|issue|language|last|last(?:authoramp)|lay(?:chapter|date|month|source|summary|url|year|)|lccn|location|month|oclc|orig(?:date|month|year)|others|p|page|page(?:s| number)|place|postscript|publisher|quote|ref|section|series|trans(?:\-title| chapter)|type|volume)[ ]*=\s*([\|}<\n])", "{{$1it$2$4"); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Cc])it(.*?)\|[ ]*(archive(?:date|url|name)|asin|at|author(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|bibcode|chapter(?:url)|coauthors|column|day[ _]+of[ _]+week|deadurl|display\-authors|doi|edit(?:ion|or)|editor(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|first|first(?:1|2|3|4)|format|id|issn|issue|language|last|last(?:authoramp)|lay(?:chapter|date|month|source|summary|url|year|)|lccn|location|month|oclc|orig(?:date|month|year)|others|p|page|page(?:s| number)|place|postscript|publisher|quote|ref|section|series|trans(?:\-title| chapter)|type|volume)[ ]*=\s*([\|}<\n])", "{{$1it$2$4"); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Cc])it(.*?)\|[ ]*(archive(?:date|url|name)|asin|at|author(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|bibcode|chapter(?:url)|coauthors|column|day[ _]+of[ _]+week|deadurl|display\-authors|doi|edit(?:ion|or)|editor(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|first|first(?:1|2|3|4)|format|id|issn|issue|language|last|last(?:authoramp)|lay(?:chapter|date|month|source|summary|url|year|)|lccn|location|month|oclc|orig(?:date|month|year)|others|p|page|page(?:s| number)|place|postscript|publisher|quote|ref|section|series|trans(?:\-title| chapter)|type|volume)[ ]*=\s*([\|}<\n])", "{{$1it$2$4"); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Cc])it(.*?)\|[ ]*(archive(?:date|url|name)|asin|at|author(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|bibcode|chapter(?:url)|coauthors|column|day[ _]+of[ _]+week|deadurl|display\-authors|doi|edit(?:ion|or)|editor(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|first|first(?:1|2|3|4)|format|id|issn|issue|language|last|last(?:authoramp)|lay(?:chapter|date|month|source|summary|url|year|)|lccn|location|month|oclc|orig(?:date|month|year)|others|p|page|page(?:s| number)|place|postscript|publisher|quote|ref|section|series|trans(?:\-title| chapter)|type|volume)[ ]*=\s*([\|}<\n])", "{{$1it$2$4"); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Cc])it(.*?)\|[ ]*(archive(?:date|url|name)|asin|at|author(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|bibcode|chapter(?:url)|coauthors|column|day[ _]+of[ _]+week|deadurl|display\-authors|doi|edit(?:ion|or)|editor(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|first|first(?:1|2|3|4)|format|id|issn|issue|language|last|last(?:authoramp)|lay(?:chapter|date|month|source|summary|url|year|)|lccn|location|month|oclc|orig(?:date|month|year)|others|p|page|page(?:s| number)|place|postscript|publisher|quote|ref|section|series|trans(?:\-title| chapter)|type|volume)[ ]*=\s*([\|}<\n])", "{{$1it$2$4"); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Cc])it(.*?)\|[ ]*(archive(?:date|url|name)|asin|at|author(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|bibcode|chapter(?:url)|coauthors|column|day[ _]+of[ _]+week|deadurl|display\-authors|doi|edit(?:ion|or)|editor(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|first|first(?:1|2|3|4)|format|id|issn|issue|language|last|last(?:authoramp)|lay(?:chapter|date|month|source|summary|url|year|)|lccn|location|month|oclc|orig(?:date|month|year)|others|p|page|page(?:s| number)|place|postscript|publisher|quote|ref|section|series|trans(?:\-title| chapter)|type|volume)[ ]*=\s*([\|}<\n])", "{{$1it$2$4"); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Cc])it(.*?)\|[ ]*(archive(?:date|url|name)|asin|at|author(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|bibcode|chapter(?:url)|coauthors|column|day[ _]+of[ _]+week|deadurl|display\-authors|doi|edit(?:ion|or)|editor(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|first|first(?:1|2|3|4)|format|id|issn|issue|language|last|last(?:authoramp)|lay(?:chapter|date|month|source|summary|url|year|)|lccn|location|month|oclc|orig(?:date|month|year)|others|p|page|page(?:s| number)|place|postscript|publisher|quote|ref|section|series|trans(?:\-title| chapter)|type|volume)[ ]*=\s*([\|}<\n])", "{{$1it$2$4"); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Cc])it(.*?)\|[ ]*(archive(?:date|url|name)|asin|at|author(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|bibcode|chapter(?:url)|coauthors|column|day[ _]+of[ _]+week|deadurl|display\-authors|doi|edit(?:ion|or)|editor(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|first|first(?:1|2|3|4)|format|id|issn|issue|language|last|last(?:authoramp)|lay(?:chapter|date|month|source|summary|url|year|)|lccn|location|month|oclc|orig(?:date|month|year)|others|p|page|page(?:s| number)|place|postscript|publisher|quote|ref|section|series|trans(?:\-title| chapter)|type|volume)[ ]*=\s*([\|}<\n])", "{{$1it$2$4"); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Cc])it(.*?)\|[ ]*(archive(?:date|url|name)|asin|at|author(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|bibcode|chapter(?:url)|coauthors|column|day[ _]+of[ _]+week|deadurl|display\-authors|doi|edit(?:ion|or)|editor(?:link|link1|link2|link3|\-link|\-link1|\-link2|\-link3|\-mask|\-name\-separator|\-separator)|first|first(?:1|2|3|4)|format|id|issn|issue|language|last|last(?:authoramp)|lay(?:chapter|date|month|source|summary|url|year|)|lccn|location|month|oclc|orig(?:date|month|year)|others|p|page|page(?:s| number)|place|postscript|publisher|quote|ref|section|series|trans(?:\-title| chapter)|type|volume)[ ]*=\s*([\|}<\n])", "{{$1it$2$4"); // //Remove some empty London Gazette ArticleText = Regex.Replace(ArticleText, @"{{\s*([Ll]ondon[ ]+[Gg]azette)(.*?)\|[ ]*(archivedate|archiveurl|articlename|asin|author|authorlink|author\-link|chapter|coauthors|column|day[ _]+of[ _]+week|deadurl|doi|edition|editor|endpage|first|format|id|issn|issue|last|lccn|location|oclc|p|page|page[ _]+number|pages|place|postscript|publisher|quote|ref|section|series|supp|trans[ _]+title|volume)[ ]*=\s*([\|}{<\n])", "{{$1$2$4"); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Ll]ondon[ ]+[Gg]azette)(.*?)\|[ ]*(archivedate|archiveurl|articlename|asin|author|authorlink|author\-link|chapter|coauthors|column|day[ _]+of[ _]+week|deadurl|doi|edition|editor|endpage|first|format|id|issn|issue|last|lccn|location|oclc|p|page|page[ _]+number|pages|place|postscript|publisher|quote|ref|section|series|supp|trans[ _]+title|volume)[ ]*=\s*([\|}{<\n])", "{{$1$2$4"); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Ll]ondon[ ]+[Gg]azette)(.*?)\|[ ]*(archivedate|archiveurl|articlename|asin|author|authorlink|author\-link|chapter|coauthors|column|day[ _]+of[ _]+week|deadurl|doi|edition|editor|endpage|first|format|id|issn|issue|last|lccn|location|oclc|p|page|page[ _]+number|pages|place|postscript|publisher|quote|ref|section|series|supp|trans[ _]+title|volume)[ ]*=\s*([\|}{<\n])", "{{$1$2$4"); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Ll]ondon[ ]+[Gg]azette)(.*?)\|[ ]*(archivedate|archiveurl|articlename|asin|author|authorlink|author\-link|chapter|coauthors|column|day[ _]+of[ _]+week|deadurl|doi|edition|editor|endpage|first|format|id|issn|issue|last|lccn|location|oclc|p|page|page[ _]+number|pages|place|postscript|publisher|quote|ref|section|series|supp|trans[ _]+title|volume)[ ]*=\s*([\|}{<\n])", "{{$1$2$4"); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Ll]ondon[ ]+[Gg]azette)(.*?)\|[ ]*(archivedate|archiveurl|articlename|asin|author|authorlink|author\-link|chapter|coauthors|column|day[ _]+of[ _]+week|deadurl|doi|edition|editor|endpage|first|format|id|issn|issue|last|lccn|location|oclc|p|page|page[ _]+number|pages|place|postscript|publisher|quote|ref|section|series|supp|trans[ _]+title|volume)[ ]*=\s*([\|}{<\n])", "{{$1$2$4"); ArticleText = Regex.Replace(ArticleText, @"{{\s*([Ll]ondon[ ]+[Gg]azette)(.*?)\|[ ]*(archivedate|archiveurl|articlename|asin|author|authorlink|author\-link|chapter|coauthors|column|day[ _]+of[ _]+week|deadurl|doi|edition|editor|endpage|first|format|id|issn|issue|last|lccn|location|oclc|p|page|page[ _]+number|pages|place|postscript|publisher|quote|ref|section|series|supp|trans[ _]+title|volume)[ ]*=\s*([\|}{<\n])", "{{$1$2$4"); // //delink month day combination ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(January|February|March|April|May|June|July|August|September|October|November|December)\s(\d{1,4})\]\]", "$1 $2"); // //delink month piped to number ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:January|February|March|April|May|June|July|August|September|October|November|December)\|(\d{1,4})\]\]", "$1"); // // delink months ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(January|February|March|April|May|June|July|August|September|October|November|December)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:January|February|March|April|May|June|July|August|September|October|November|December)\|(January|February|March|April|May|June|July|August|September|October|November|December)\]\]", "$1"); //Treat 'Sept' (i.e. month abbreviation) differently from 'sept' (i.e. family) ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[January\|(Jan)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[February\|(Feb)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[March\|(Mar)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[April\|(Apr)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[May\|(May)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[June\|(Jun)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[July\|(Jul)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[August\|(Aug)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[September\|(Sep)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[October\|(Oct)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[November\|(Nov)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[December\|(Dec)\]\]", "$1"); // //4 digit years piped into 2 ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(\d{1,4})\]\]", "$1"); // //4 digit years piped into 2 ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[\d{1,4}\|(\d{1,2})\]\]", "$1"); // //time and seasons ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(age|afternoon|centennial|century|circa|da[iy](?:s|ly|)|decade|easter|epoch|era|fiscal year|hour(?:ly|)|mid(?:day|night|)|minute|month(?:ly|)|morning|night(?:ly|)|noon|old style and new style dates|present(?:ly| time|)|second|time zone|times|week(?:end|s|y|ly|)|year(?:s|ly|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(age|afternoon|centennial|century|circa|da[iy](?:s|ly|)|decade|easter|epoch|era|fiscal year|hour(?:ly|)|mid(?:day|night|)|minute|month(?:ly|)|morning|night(?:ly|)|noon|old style and new style dates|present(?:ly| time|)|second|time zone|times|week(?:end|s|y|ly|)|year(?:s|ly|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(Mon(?:.|day|)|Tues(?:.|day|)|Wed(?:.|day|nesday|)|Thurs(?:.|day|)|Fri(?:.|day|)|Sat(?:.|day|urday|)|Sun(?:.|day|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(Mon(?:.|day|)|Tues(?:.|day|)|Wed(?:.|day|nesday|)|Thurs(?:.|day|)|Fri(?:.|day|)|Sat(?:.|day|urday|)|Sun(?:.|day|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(autumn|fall|gregorian calendar|independence day \(united states\)|julian calendar|spring(?:season|)|season(?:al|)|summer|winter|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(autumn|fall|gregorian calendar|independence day \(united states\)|julian calendar|spring(?:season|)|season(?:al|)|summer|winter|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(age of enlightenment|jin dynasty \(265\-420\)|late middle ages|medieval|renaissance|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(age of enlightenment|jin dynasty \(265\-420\)|late middle ages|medieval|renaissance|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:central european|coordinated universal|daylight saving|greenwich mean|japan standard|universal|) time)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:central european|coordinated universal|daylight saving|greenwich mean|japan standard|universal|) time)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bronze|iron|golden|old|platinum|silver|) age)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bronze|iron|golden|old|platinum|silver|) age)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:liao|pahlavi|qajar|qing|) dynasty)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:liao|pahlavi|qajar|qing|) dynasty)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:common|vargas|victorian|warlord|) era)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:common|vargas|victorian|warlord|) era)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:asuka|azuchi\-momoyama|bakumatsu|edo|five dynasties and ten kingdoms|heian|jōmon|kamakura|kofun|meiji|muromachi|nara|shōwa|yayoi‎|) period)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:asuka|azuchi\-momoyama|bakumatsu|edo|five dynasties and ten kingdoms|heian|jōmon|kamakura|kofun|meiji|muromachi|nara|shōwa|yayoi‎|) period)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})nd century|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})nd century|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})rd century|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})rd century|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})st century|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})st century|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})th century|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})th century|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})nd century|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})nd century|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})rd century|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})rd century|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})st century|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})st century|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})th century|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})th century|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})nd century BC|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})nd century BC|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})rd century BC|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})rd century BC|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})st century BC|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})st century BC|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})th century BC|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})th century BC|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})nd century BC|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})nd century BC|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})rd century BC|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})rd century BC|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})st century BC|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})st century BC|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})th century BC|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})th century BC|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})nd century BCE|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})nd century BCE|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})rd century BCE|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})rd century BCE|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})st century BCE|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})st century BCE|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})th century BCE|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})th century BCE|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})nd century BCE|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})nd century BCE|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})rd century BCE|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})rd century BCE|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})st century BCE|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})st century BCE|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})th century BCE|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})th century BCE|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})nd millennium BC|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})nd millennium BC|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})rd millennium BC|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})rd millennium BC|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})st millennium BC|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})st millennium BC|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})th millennium BC|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})th millennium BC|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})nd millennium BC|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})nd millennium BC|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})rd millennium BC|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})rd millennium BC|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})st millennium BC|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})st millennium BC|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})th millennium BC|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})th millennium BC|)\|([^\]]+?)\]\]", "$3"); // // months ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(Jan(?:uary|\.|)|Feb(?:ruary|\.|)|Mar(?:ch|\.|)|Apr(?:il|\.|)|May\.?|Jun(?:e|\.|)|Jul(?:y|\.|)|Aug(?:ust|\.|)|Sep(?:tember|\.|t\.?|)|Oct(?:ober|\.|)|Nov(?:ember|\.|)|Dec(?:ember|\.|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:January|February|March|April|May|June|July|August|September|October|November|December)\|([^\]]{1,30})\]\]", "$1"); // // proper nouns ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(public holiday)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[Christmas\|([^\]]+?)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(Christmas|Easter|Labour|May)( day| eve|)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(New year('s day|'s eve|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:Broadway|West End)(\sTheatre|)|Hollywood|Hollywood, California)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"\[\[(?:Broadway|West End) theatre\|(Broadway|West End)\]\]", "$1"); // // people general, professions ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(activis[mt]|arranger|art(?:ist| teacher|)|athlete|athletics|author|(?:auto|)biography|camera|cinema|civilian|civil\sserv(?:ant|ice)|comedian|composer|conducting|conductor|consul(?:ate|ar|tant|)|criminal|critic|cultur(?:e|al)|dance[rs]?|dancing|dentist|designer|dj|dis[ck] jockey|drummer|editor|editors?-in-chief|educator|embassy|group|guest star|hacker|journalis[mt]|librar(?:ian|ie|y)|mayor|model|music(?:al(?: theatre|theater|)|ian|)|multi-instrumentalist|offic(?:e|ial)|paint(?:er|ing|)|piano|pianist|photograph(?:er|y|)|playwright|police|politic(?:s|al|ian)|porn star|producer|professor|prostitut(?:e|ion)|pseudonym|publisher|radio|(?:record )company|scien(?:ce|tist)|screen.?writer|sculpt(?:or|ure)|solicitor|singer.songwriter|slave|song|songwriter|songwriting|student|teacher|tradition|trumpet|trumpeter|tv|television|waiter|writer)(s|)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(cotton|dress|tailor|(?:neck|)tie|shirt|jacket|trouser|shoe)(s|)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[musical theatre\|(music(?:al(?: theatre|theater|)s?))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(beauty (?:competition|contest|pageant|queen))(s|)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(game|contest|contestant|question|answer)(s|)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:artist|painting)\|(painting|painter)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(baker|grocer)(ies|y|)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(cable |satellite |terrestrial |)(tv|television)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(clothing|clothe?|cotton|leather|silk|nylon|dress|tailor|(?:neck|)tie|shirt|jacket|trouser|shoe|suit)(s|)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(answer|question|competition|contest|contestant|game|pageant)(s|)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:paint|writ)ing\|(painter|writer)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(abbasids|abenaki|abraham bryan|acadians|adolphe thiers|african\-|afrikaans|al pacino|alans|albert einstein|alexander (?:i of russia|kazhdan|)|alfred hitchcock|american(?:s)|amharic|ancient greek|anglo\-irish|anthony cave brown|arab(?:s|ic| world)|aramean(?:s)|aristotle|artisan|australian|austro\-hungarian|azerbaijani|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(abbasids|abenaki|abraham bryan|acadians|adolphe thiers|african\-|afrikaans|al pacino|alans|albert einstein|alexander (?:i of russia|kazhdan|)|alfred hitchcock|american(?:s)|amharic|ancient greek|anglo\-irish|anthony cave brown|arab(?:s|ic| world)|aramean(?:s)|aristotle|artisan|australian|austro\-hungarian|azerbaijani|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(baloch|baltic german|balts|ban ki\-moon|bantu|barbara bush|barbarian(?:s|)|basque|belarusians|bavarian(?:s)|benazir bhutto|benito juárez|benjamin franklin|benny morris|berber|berit nøkleby|bernard (?:cornwell)|black seminole(?:s|)|bob hope|bosley crowther|bosinak(?:s)|bosnian(?: serb|\-serb|\-serbs|)|bo yang|brahui|bretons|british|bruce willis|bulgars|bulgarian(?:s|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(baloch|baltic german|balts|ban ki\-moon|bantu|barbara bush|barbarian(?:s|)|basque|belarusians|bavarian(?:s)|benazir bhutto|benito juárez|benjamin franklin|benny morris|berber|berit nøkleby|bernard (?:cornwell)|black seminole(?:s|)|bob hope|bosley crowther|bosinak(?:s)|bosnian(?: serb|\-serb|\-serbs|)|bo yang|brahui|bretons|british|bruce willis|bulgars|bulgarian(?:s|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(cai yong|canadian(?:s|)|cao (?:chong|song|wai|zhi|)|carol rosenberg|cassius dio|catherine (?:ii of russia|the great|)|celt(?:s|)|charles (?:dickens|edward stuart|iv of spain|vi of france|vii of france|)|chinese|christopher columbus|cicero|circassian(?:s|)|clan(?:s|)|claudius|clint eastwood|commanche|condoleezza rice|cook \(profession\)|coptic|crimean|croatian(?:s|)|croat(?:s|)|c\. s\. forester|cui yan|curonian(?:s|)|czech(?:\-american|s))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(cai yong|canadian(?:s|)|cao (?:chong|song|wai|zhi|)|carol rosenberg|cassius dio|catherine (?:ii of russia|the great|)|celt(?:s|)|charles (?:dickens|edward stuart|iv of spain|vi of france|vii of france|)|chinese|christopher columbus|cicero|circassian(?:s|)|clan(?:s|)|claudius|clint eastwood|commanche|condoleezza rice|cook \(profession\)|coptic|crimean|croatian(?:s|)|croat(?:s|)|c\. s\. forester|cui yan|curonian(?:s|)|czech(?:\-american|s))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(danes|david (?:cameron|halberstam)|diana\, princess of wales|diodorus siculus|doctor who|dogra|dutch|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(danes|david (?:cameron|halberstam)|diana\, princess of wales|diodorus siculus|doctor who|dogra|dutch|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(eagle scout \(boy scouts of america\)|Éamon de valera|east slavs|eastern european|ed harris|edmund (?:allenby|burke|)|edward (?:iv of england|vi of england)|edwin lutyens|egyptian(?:s|)|eleanor roosevelt|elizabeth (?:i|i of england|)|emperor zhuangzong of later tang|english|ernst klee|errol flynn|estonians|eurasian avars|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(eagle scout \(boy scouts of america\)|Éamon de valera|east slavs|eastern european|ed harris|edmund (?:allenby|burke|)|edward (?:iv of england|vi of england)|edwin lutyens|egyptian(?:s|)|eleanor roosevelt|elizabeth (?:i|i of england|)|emperor zhuangzong of later tang|english|ernst klee|errol flynn|estonians|eurasian avars|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(emigrate|emperor (?:ai|dezong|gaozong|jingzong|muzong|shunzong|wenzong|xianzong|xizong|xuānzong|yizong) of tang)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(emigrate|emperor (?:ai|dezong|gaozong|jingzong|muzong|shunzong|wenzong|xianzong|xizong|xuānzong|yizong) of tang)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(fatimid(?: caliphate|)|filipino|finns|franco|frank (?:sinatra|)|frederick william (?:ii of prussia|iii of prussia|)|french(?:\-canadian| language|)|f\. w\. s\. craig)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(fatimid(?: caliphate|)|filipino|finns|franco|frank (?:sinatra|)|frederick william (?:ii of prussia|iii of prussia|)|french(?:\-canadian| language|)|f\. w\. s\. craig)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gaelic|gan ji|gary cooper|gaul(?:s|)|george i of great britain|georgian(?:s)|german(?:s|ic| language|\-american)|goth(?:s|)|greek(?:s|)|gregory peck|gujjar)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gaelic|gan ji|gary cooper|gaul(?:s|)|george i of great britain|georgian(?:s)|german(?:s|ic| language|\-american)|goth(?:s|)|greek(?:s|)|gregory peck|gujjar)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(harem|harrison ford|harry turtledove|hebrew|henry clay|henry ii of france|herodotus|hillary (?:clinton|rodham clinton|)|hispanic|hispanic and latino american(?:s)|hittite(?:s)|hmong|homer|hugh n\. kennedy|huguenot(?:s)|hui|hungarian(?:s))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(harem|harrison ford|harry turtledove|hebrew|henry clay|henry ii of france|herodotus|hillary (?:clinton|rodham clinton|)|hispanic|hispanic and latino american(?:s)|hittite(?:s)|hmong|homer|hugh n\. kennedy|huguenot(?:s)|hui|hungarian(?:s))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ferdinand i|ferdinand ii|francis ii|joseph ii|)\, holy roman emperor)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ferdinand i|ferdinand ii|francis ii|joseph ii|)\, holy roman emperor)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(illyrians|indo\-aryan|iranian|iraqi|irish|italian(?:s))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(illyrians|indo\-aryan|iranian|iraqi|irish|italian(?:s))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(j\.b\. bury|j\. b\. bury|j\. edgar hoover|jacques chirac|james (?:bond|fenimore cooper|)japanese|jean froissart|jesse jackson|jewish|ji ben|jimmy buffett|joe biden|jon latimer|john (?:curtin|ii of france|julius norwich|howard|wayne|wilkes booth|)|joshua reynolds|jules verne)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(j\.b\. bury|j\. b\. bury|j\. edgar hoover|jacques chirac|james (?:bond|fenimore cooper|)japanese|jean froissart|jesse jackson|jewish|ji ben|jimmy buffett|joe biden|jon latimer|john (?:curtin|ii of france|julius norwich|howard|wayne|wilkes booth|)|joshua reynolds|jules verne)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(kaiser wilhelm ii|karl marx|khazars|khitan|king arthur|knut helle|kofi annan|korean(?:s|)|kurd(?:s|)|kurdish|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(kaiser wilhelm ii|karl marx|khazars|khitan|king arthur|knut helle|kofi annan|korean(?:s|)|kurd(?:s|)|kurdish|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(laurence olivier|lavrentiy beria|lech kaczyński|li ru|list of famous puerto ricans|lithuanian|lombard(?:s|)|louban|louis (?:of mecklenburg\-strelitz|mountbatten|)|luo guanzhong|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(laurence olivier|lavrentiy beria|lech kaczyński|li ru|list of famous puerto ricans|lithuanian|lombard(?:s|)|louban|louis (?:of mecklenburg\-strelitz|mountbatten|)|luo guanzhong|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(magyars|manuel i of portugal|marathi|māori|maria theresa|maria theresa of austria|marie antoinette|marilyn monroe|mark (?:peattie|twain|)|mary of teck|mathematician|mathew brady|maximilian i\, holy roman emperor|mexican\-american|mi heng|middle persian|michael j\. varhola|mongolian(?:s|)|mongol(?:s|)|moor(?:s|)|mulatto)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(magyars|manuel i of portugal|marathi|māori|maria theresa|maria theresa of austria|marie antoinette|marilyn monroe|mark (?:peattie|twain|)|mary of teck|mathematician|mathew brady|maximilian i\, holy roman emperor|mexican\-american|mi heng|middle persian|michael j\. varhola|mongolian(?:s|)|mongol(?:s|)|moor(?:s|)|mulatto)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(nawaz sharif|native hawaiians|nephew|nero|neville chamberlain|nickname|nicolas sarkozy|nogais|north korean(?:s|)|north vietnamese|norwegian(?:s)|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(nawaz sharif|native hawaiians|nephew|nero|neville chamberlain|nickname|nicolas sarkozy|nogais|north korean(?:s|)|north vietnamese|norwegian(?:s)|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(obotrites|old prussians|orphan(?:age)|ortoqid|oglala lakota|overseas chinese)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(obotrites|old prussians|orphan(?:age)|ortoqid|oglala lakota|overseas chinese)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(palestinian(?:s|)|pan ji|pang (?:ji|tong|)|parallel lives|pashtu(?:n|)|patrick o\'brian|paul i of russia|pechenegs|pei songzhi|peloponnese|peter (?:iii of russia)|persian|pirate|plato|plutarch|polabian slavs|polish|polybius|ponca|pope john paul ii|portuguese|posthumous name|privateers|prussian(?:s)|punjab(?:i|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(palestinian(?:s|)|pan ji|pang (?:ji|tong|)|parallel lives|pashtu(?:n|)|patrick o\'brian|paul i of russia|pechenegs|pei songzhi|peloponnese|peter (?:iii of russia)|persian|pirate|plato|plutarch|polabian slavs|polish|polybius|ponca|pope john paul ii|portuguese|posthumous name|privateers|prussian(?:s)|punjab(?:i|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(queen elizabeth the queen mother|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(queen elizabeth the queen mother|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(race \(u\.s\. census\)|rafe de crespigny|ramsay macdonald|raymond poincaré|refugee(?:s|)|robert f\. kennedy|roger ebert|roma \(romani subgroup\)|roman(?:i|ian|ians|)|rudyard kipling|russian(?:s)|ruthenians)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(race \(u\.s\. census\)|rafe de crespigny|ramsay macdonald|raymond poincaré|refugee(?:s|)|robert f\. kennedy|roger ebert|roma \(romani subgroup\)|roman(?:i|ian|ians|)|rudyard kipling|russian(?:s)|ruthenians)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(samnites|saracen|sarmatian(?:s)|saudi|scottish|scottish gaelic|sean connery|seljuk turks|selonian(?:s|)|semigallian(?:s|)|serbian(?: cyrillic|)|serbo\-croatian|serbs of croatia|shah|sima (?:feng|guang|hui|jun|lang|)|shipfitter|shu han|sindhi|sl[ao]v[ai][ck](?:s|)|slav(?:s|)|slovenes|snorri sturluson|somali|sorbs|south african|soviet(?:s|)|spaniards|spanish|spy|stephen (?:harper|)|steven (?:runciman|spielberg|)|suetonius|sun yat\-sen|swahili|swedish|swiss|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(samnites|saracen|sarmatian(?:s)|saudi|scottish|scottish gaelic|sean connery|seljuk turks|selonian(?:s|)|semigallian(?:s|)|serbian(?: cyrillic|)|serbo\-croatian|serbs of croatia|shah|sima (?:feng|guang|hui|jun|lang|)|shipfitter|shu han|sindhi|sl[ao]v[ai][ck](?:s|)|slav(?:s|)|slovenes|snorri sturluson|somali|sorbs|south african|soviet(?:s|)|spaniards|spanish|spy|stephen (?:harper|)|steven (?:runciman|spielberg|)|suetonius|sun yat\-sen|swahili|swedish|swiss|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(tacitus|tadun|tajik|tamil|tatar(?:s|)|teenager(?:s)|ten attendants|thai|theodosius|theophanes the confessor|tom (?:clancy|cruise|hanks)|tuareg|tujue|turk(?:ic|ish|s|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(tacitus|tadun|tajik|tamil|tatar(?:s|)|teenager(?:s)|ten attendants|thai|theodosius|theophanes the confessor|tom (?:clancy|cruise|hanks)|tuareg|tujue|turk(?:ic|ish|s|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ukrainian|umar|urdu|uyghur|uzbek(?:s|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ukrainian|umar|urdu|uyghur|uzbek(?:s|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(vietnamese|(?:victoria|) of the united kingdom|viking|vince lombardi|virgin mary|visigoth(?:s|)|voltaire|vyacheslav molotov|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(vietnamese|(?:victoria|) of the united kingdom|viking|vince lombardi|virgin mary|visigoth(?:s|)|voltaire|vyacheslav molotov)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(walter scott|walloon(?:s)|welsh|wends|western|william (?:ii\, german emperor|l\. shirer|lyon mackenzie king|pitt the younger|richard o\'byrne|shakespeare|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(walter scott|walloon(?:s)|welsh|wends|western|william (?:ii\, german emperor|l\. shirer|lyon mackenzie king|pitt the younger|richard o\'byrne|shakespeare|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(xianbei|xun yu)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(xianbei|xun yu)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(yasser arafat|yiddish|yishuv|yuri andropov)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(yasser arafat|yiddish|yishuv|yuri andropov)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(zhang (?:hong|miao|rang|song|wen \(han dynasty\)|zhongjing|)|zhong yao|zulfikar ali bhutto|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(zhang (?:hong|miao|rang|song|wen \(han dynasty\)|zhongjing|)|zhong yao|zulfikar ali bhutto|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(algonquian|apache|arikara|arapaho|aztec|blackfoot|cherokee|cheyenne|chickasaw|chippewa|choctaw|comanche|cree|dakota|indigenous peoples of the americas|iroquois|kickapoo|lakota|mandan|mapuche|mi\'kmaq|mohave|natchez|native american \(u\.s\. census\)|native americans in the united states|plains indians|seminole|shawnee|shoshone|tribal chief|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(algonquian|apache|arikara|arapaho|aztec|blackfoot|cherokee|cheyenne|chickasaw|chippewa|choctaw|comanche|cree|dakota|indigenous peoples of the americas|iroquois|kickapoo|lakota|mandan|mapuche|mi\'kmaq|mohave|natchez|native american \(u\.s\. census\)|native americans in the united states|plains indians|seminole|shawnee|shoshone|tribal chief|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((algonquian|apache|arapaho|cherokee|cheyenne|chickasaw|chippewa|choctaw|comanche|creek|dakota|iroquois|kickapoo|lakota|mi\'kmaq|mohave|natchez|omaha|otoe|seminole|shawnee|shoshone|ute|)\s*(language(?:s|)| american(?:s|)| literature| people(?:s|)| philosophy| culture(?:s|)| tribe))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((algonquian|apache|arapaho|cherokee|cheyenne|chickasaw|chippewa|choctaw|comanche|creek|dakota|iroquois|kickapoo|lakota|mi\'kmaq|mohave|natchez|omaha|otoe|seminole|shawnee|shoshone|ute|)\s*(language(?:s|)| american(?:s|)| literature| people(?:s|)| philosophy| culture(?:s|)| tribe))\|([^\]]+?)\]\]", "$4"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:african|african\-|asian|danish|finnish|white) american)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:african|african\-|asian|danish|finnish|white) american)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((african american|african\-|african\-american|amharic|ancient greek|arab|arab(?:s|ic)|asian|australian|azerbaijani|baloch|bantu|basque|berber|black|bosnian|brahui|british|cantonese|catalan|chamorro|chechen|chinese|colombian|coptic|croatian|cuban|czech|danish|dutch|english|european|filipino|finnish|franco|french|ga|gaelic|german|georgian|greek|gondi|hebrew|hispanic|hmong|hui|hungarian|indo\-aryan|indian|iranian|iraqi|irish|italian|japanese|jewish|jurchen|kashmiri|khitan|khmer|korean|kurdish|lao|lithuanian|livonian|malay|marathi|māori|mexican|mongolian|north korean|norwegian|n[u|ù]ng|palestinian|pashtu(?:n|)|persian|polish|portuguese|punjab(?:i|)|qiang|roman(?:i|ian|)|russian|samoan|saudi|scots\-irish|scottish|sl[ao]v[ai]c|serbian|serbo\-croatian|sindhi|somali|soviet|spanish|swahili|swedish|tajik|tamil|tatar|thai|tuareg|turk(?:ic|ish|)|ukrainian|urdu|uyghur|vietnamese|welsh|western|yiddish|)\s*(language(?:s|)| american(?:s|)| literature| people| philosophy| culture(?:s|)))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((african american|african\-|african\-american|amharic|ancient greek|arab|arab(?:s|ic)|asian|australian|azerbaijani|baloch|bantu|basque|berber|black|bosnian|brahui|british|cantonese|catalan|chamorro|chechen|chinese|colombian|coptic|croatian|cuban|czech|danish|dutch|english|european|filipino|finnish|franco|french|ga|gaelic|german|georgian|greek|gondi|hebrew|hispanic|hmong|hui|hungarian|indo\-aryan|indian|iranian|iraqi|irish|italian|japanese|jewish|jurchen|kashmiri|khitan|khmer|korean|kurdish|lao|lithuanian|livonian|malay|marathi|māori|mexican|mongolian|north korean|norwegian|n[u|ù]ng|palestinian|pashtu(?:n|)|persian|polish|portuguese|punjab(?:i|)|qiang|roman(?:i|ian|)|russian|samoan|saudi|scots\-irish|scottish|sl[ao]v[ai]c|serbian|serbo\-croatian|sindhi|somali|soviet|spanish|swahili|swedish|tajik|tamil|tatar|thai|tuareg|turk(?:ic|ish|)|ukrainian|urdu|uyghur|vietnamese|welsh|western|yiddish|)\s*(language(?:s|)| american(?:s|)| literature| people| philosophy| culture(?:s|)))\|([^\]]+?)\]\]", "$4"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:african american|asian|family|hispanic|latino|pacific islander|white|white hispanic) \(u\.s\.\ census\))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:african american|asian|family|hispanic|latino|pacific islander|white|white hispanic) \(u\.s\.\ census\))\|([^\]]+?)\]\]", "$2"); // // sports and hobbies ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(alabama crimson tide football|all\-america football conference|american (?:football|football league|football coaches association|)|amos alonzo stagg award|arena|arizona diamondbacks|association football|at bat|athlet(?:es|ic|ic director|ics)|atlanta (?:braves|dream)|atlantic hockey)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(alabama crimson tide football|all\-america football conference|american (?:football|football league|football coaches association|)|amos alonzo stagg award|arena|arizona diamondbacks|association football|at bat|athlet(?:es|ic|ic director|ics)|atlanta (?:braves|dream)|atlantic hockey)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(badminton|ball hockey|baseball hall of fame|basketball hall of fame|big ten conference|boston yanks|bowl (?:championship series|game)|bowling|brooklyn dodgers(?: \(nfl\)))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(badminton|ball hockey|baseball hall of fame|basketball hall of fame|big ten conference|boston yanks|bowl (?:championship series|game)|bowling|brooklyn dodgers(?: \(nfl\)))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(basketball at the (\d{1,4}) summer olympics|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(basketball at the (\d{1,4}) summer olympics|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(cactus league|camelback ranch|canadian football league|canoeing|cbs sports|center \(american football\)|center fielder|chicago (?:bears|cubs|white sox|)|cincinnati reds|cleveland (?:browns|cavaliers|indians)|climb(?:ing|er|)|college (?:basketball|baseball|football|football hall of fame|football all\-america team|ice hockey|rugby|soccer|tennis|)|collegiate wrestling|colorado (?: avalanche|rockies)|conference usa|cornerbacks coach|cricket(?:er|)|cross country running|curling|cycl(?:ing|ist|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(cactus league|camelback ranch|canadian football league|canoeing|cbs sports|center \(american football\)|center fielder|chicago (?:bears|cubs|white sox|)|cincinnati reds|cleveland (?:browns|cavaliers|indians)|climb(?:ing|er|)|college (?:basketball|baseball|football|football hall of fame|football all\-america team|ice hockey|rugby|soccer|tennis|)|collegiate wrestling|colorado (?: avalanche|rockies)|conference usa|cornerbacks coach|cricket(?:er|)|cross country running|curling|cycl(?:ing|ist|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(dallas cowboys|defensive (?:back|coordinator|)|detroit lions|division i \(ncaa\)|dodgeball|double \(baseball\)|double play)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(dallas cowboys|defensive (?:back|coordinator|)|detroit lions|division i \(ncaa\)|dodgeball|double \(baseball\)|double play)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(england national rugby union team)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(england national rugby union team)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(fa cup final|fenc(?:ing|)|fiba world championship|field hockey|fiesta bowl|fifa(?: world cup)|first\-class cricket|football association|formula one|fullback \(american football\)|futsal)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(fa cup final|fenc(?:ing|)|fiba world championship|field hockey|fiesta bowl|fifa(?: world cup)|first\-class cricket|football association|formula one|fullback \(american football\)|futsal)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(golden state warriors|golf(?:er|ing| club| course|)|goodyear ballpark|green bay packers|gym|gymnast(ics|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(golden state warriors|golf(?:er|ing| club| course|)|goodyear ballpark|green bay packers|gym|gymnast(ics|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(halfback \(american football\)|heisman trophy|high school football|hik(?:e|er|es|ing)|hit \(baseball\)|hitting streak|hockey|home run|houston astros|hunt(?:s|er|ing|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(halfback \(american football\)|heisman trophy|high school football|hik(?:e|er|es|ing)|hit \(baseball\)|hitting streak|hockey|home run|houston astros|hunt(?:s|er|ing|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(international olympic committee|intramural)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(international olympic committee|intramural)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(judo)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(judo)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(kansas city (?:chiefs|royals)|karate)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(kansas city (?:chiefs|royals)|karate)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(lacrosse|liberty bowl|linebacker|little league|los angeles (?:angels|angels of anaheim|lakers))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(lacrosse|liberty bowl|linebacker|little league|los angeles (?:angels|angels of anaheim|lakers))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(major league baseball(?: all\-star game)|marathon|martial art(?:s|ist|)|marylebone cricket club|maryvale baseball park|maxwell award|miami dolphins|milwaukee brewers|minnesota twins|minor league baseball|mlb|motorcycl(?:e|es|ing|ist|)|mountain (?:biking|climbing|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(major league baseball(?: all\-star game)|marathon|martial art(?:s|ist|)|marylebone cricket club|maryvale baseball park|maxwell award|miami dolphins|milwaukee brewers|minnesota twins|minor league baseball|mlb|motorcycl(?:e|es|ing|ist|)|mountain (?:biking|climbing|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(nascar|national (?:basketball association|collegiate athletic association|football foundation|football foundation gold medal winners|football league|)|nba(?: most valuable player| rookie of the year|) award|ncaa|new (?:england patriots|york giants|york yanks|york yankees)|nfl|nhl)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(nascar|national (?:basketball association|collegiate athletic association|football foundation|football foundation gold medal winners|football league|)|nba(?: most valuable player| rookie of the year|) award|ncaa|new (?:england patriots|york giants|york yanks|york yankees)|nfl|nhl)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(oakland athletics|orienteer(?:ing|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(oakland athletics|orienteer(?:ing|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(pac\-10 conference|pacific coast (?:conference|league)|paintball|parachut(?:s|ist|ing)|patriot league|philadelphia eagles|polo|pool|pro football hall of fame)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(pac\-10 conference|pacific coast (?:conference|league)|paintball|parachut(?:s|ist|ing)|patriot league|philadelphia eagles|polo|pool|pro football hall of fame)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(quarterback)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(quarterback)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(referee|right fielder|rock climbing|rugby(?: football| union| world cup|)|run \(baseball\)|run batted in|run(ning|ners?|)|running back)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(referee|right fielder|rock climbing|rugby(?: football| union| world cup|)|run \(baseball\)|run batted in|run(ning|ners?|)|running back)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(sailing|san (?:antonio spurs|diego padres|francisco giants|francisco 49ers)|scuba diving|seattle (?:mariners|seawalks|supersonic|)|shortstop|silver anniversary awards \(ncaa\)|shot put|ski(?:er|ing|)|skydiving|snooker|soccer|southeastern conference|sports?|st\. louis (?:blues|cardnals|rams)|stolen base|super(?:bowl| bowl))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(sailing|san (?:antonio spurs|diego padres|francisco giants|francisco 49ers)|scuba diving|seattle (?:mariners|seawalks|supersonic|)|shortstop|silver anniversary awards \(ncaa\)|shot put|ski(?:er|ing|)|skydiving|snooker|soccer|southeastern conference|sports?|st\. louis (?:blues|cardnals|rams)|stolen base|super(?:bowl| bowl))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:phoenix municipal|scottsdale|surprise|tempe diablo|university of phoenix) stadium)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:phoenix municipal|scottsdale|surprise|tempe diablo|university of phoenix) stadium)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(super bowl(.*?))\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(super bowl(.*?))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(swimm(?:ing|er|ing pool))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(swimm(?:ing|er|ing pool))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(table tennis|taekwondo|team (?:handball|sport|)|texas rangers \(baseball\)|theodore roosevelt award \(ncaa\)|third baseman|toronto blue jays|touchdowns|tour de france|track and field(?:athletics)|triathlon|triple \(baseball\))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(table tennis|taekwondo|team (?:handball|sport|)|texas rangers \(baseball\)|theodore roosevelt award \(ncaa\)|third baseman|toronto blue jays|touchdowns|tour de france|track and field(?:athletics)|triathlon|triple \(baseball\))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(uefa european championship|uefa european football championship)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(uefa european championship|uefa european football championship)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(varsity letter)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(varsity letter)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(washington redskins|water polo|weight training|wide receiver|windsurfing|world (?:cup|series|)|wrestl(?:er|ing|)|wrigley field)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(washington redskins|water polo|weight training|wide receiver|windsurfing|world (?:cup|series|)|wrestl(?:er|ing|)|wrigley field)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(base|basket|broom|foot|hand|volley)(ball(?:s|ers|ing|\sfield?||\splayers?|))\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:track and field|athletics \(sport\))\|(track|field|athlet(?:ic|e)s?)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:human swimming|swimming \(sport\))\|(swimming|swimmer|sw[aiu]ms?)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:tennis\||)(tennis|tennis\scourts?|tennis players?)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(grass courts?|clay courts?|hard courts?|grand\sslam)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(american|australian) rules football\]\]", "$1 rules football"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:hobby\||)(hobb(?:|ies|y))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) fa cup final)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) fa cup final)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) fiba world championship)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) fiba world championship)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) fifa world cup)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) fifa world cup)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) chicago staleys season)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) chicago staleys season)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) chicago bears season)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) chicago bears season)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) ncaa men\'s basketball all\-americans|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) ncaa men\'s basketball all\-americans|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) nfl draft)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) nfl draft)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) nfl season)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) nfl season)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) rugby world cup)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) rugby world cup)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) summer olympics|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) summer olympics|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) winter olympics|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) winter olympics|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) ncaa men\'s basketball all\-americans|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) ncaa men\'s basketball all\-americans|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(uefa euro (\d{1,4}))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(uefa euro (\d{1,4}))\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bronze|gold|silver) medal|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bronze|gold|silver) medal|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:base|basket|flicker|foot|fut|golf|hand|net|racquet|soccer|soft|volley|wally|wiffle|)[ ]*ball)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:base|basket|flicker|foot|fut|golf|hand|net|racquet|soccer|soft|volley|wally|wiffle|)[ ]*ball)\|([^\]]+?)\]\]", "$2"); // // topic in parens //ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[([^\]]+?)\s*\((abolitionist|act(?:ing|or)|airline|album|american author|animal|author|band|biblical|book|botany|catholicism|city|comic(?:s|)|composer|comput(?:er|ing)|contemporary|county|county subdivision|creek|cricket(?:er|)|christianity|cultural|cycl(?:e|ist|ing|)|delegate|director|documentary|education|english actor|entertain(?:ment|er)|fictional character|filibuster|film(?:maker|ing| editor|)|financ(?:e|ier|ing)|football|franchise|friut|gardening|gemstone|geology|genre|historian|high priest|honorific|house|immigration|inventor|journalist|legal)\)\|([^\]]+?)\]\]", "$3"); //ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[([^\]]+?)\s*\((abolitionist|act(?:ing|or)|airline|album|american author|animal|author|band|biblical|book|botany|catholicism|city|comic(?:s|)|composer|comput(?:er|ing)|contemporary|county|county subdivision|creek|cricket(?:er|)|christianity|cultural|cycl(?:e|ist|ing|)|delegate|director|documentary|education|english actor|entertain(?:ment|er)|fictional character|filibuster|film(?:maker|ing| editor|)|financ(?:e|ier|ing)|football|franchise|friut|gardening|gemstone|geology|genre|historian|high priest|honorific|house|immigration|inventor|journalist|legal)\)\]\]", "$1"); //ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[([^\]]+?)\s*\((magazine|mathematics|metalworking|minerals|monopoly|music(?:al|ian|)|mythology|novel(?:ist|la|)|miniseries|newspaper|painter|parliment|play|politic(?:s|ian)|priest|producer|publisher|region|river|rugby(?: union|)|sanctuary|school|sculpture|singer|sound engineer|sport|soil|song|supply chain|sur(?:name|veyor|)|swedish band|television(?: documentary series)|tennis|theologian|title|town|tribe|tv(?: and radio| miniseries| producer| series| network)|uk parliament constituency|vegetable|village|virtue|website|writer|u\.s\. tv channel|)\)\]\]", "$1"); //ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[([^\]]+?)\s*\((magazine|mathematics|metalworking|minerals|monopoly|music(?:al|ian|)|mythology|novel(?:ist|la|)|miniseries|newspaper|painter|parliment|play|politic(?:s|ian)|priest|producer|publisher|region|river|rugby(?: union|)|sanctuary|school|sculpture|singer|sound engineer|sport|soil|song|supply chain|sur(?:name|veyor|)|swedish band|television(?: documentary series)|tennis|theologian|title|town|tribe|tv(?: and radio| miniseries| producer| series| network)|uk parliament constituency|vegetable|village|virtue|website|writer|u\.s\. tv channel|)\)\|([^\]]+?)\]\]", "$3"); //ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[([^\]]+?)\s*\(((\d{1,4}) film|)\)\]\]", "$2"); //ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[([^\]]+?)\s*\(((\d{1,4}) film|)\)\|([^\]]+?)\]\]", "$4"); // // Television, movies, music & media ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(academy award for best (?:actor|actress|adapted screenplay|art direction|cinematography|director|foreign language film|original screenplay|sound editing|picture|story|supporting actor|supporting actress|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(academy award for best (?:actor|actress|adapted screenplay|art direction|cinematography|director|foreign language film|original screenplay|sound editing|picture|story|supporting actor|supporting actress|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(academy award for (?:costume design|film editing|original music score|original screenplay|visual effects|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(academy award for (?:costume design|film editing|original music score|original screenplay|visual effects|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(act(?:ing|ion film|or|ress)|advertizing agency|album(?:s)|american (?:broadcasting company|film institute|)|amphitheatre|anime|animat(?:ed series|ed|ed film|ion)|audio\s(?:cassette|tape)|audition)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(act(?:ing|ion film|or|ress)|advertizing agency|album(?:s)|american (?:broadcasting company|film institute|)|amphitheatre|anime|animat(?:ed series|ed|ed film|ion)|audio\s(?:cassette|tape)|audition)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(bafta|bagpipe(?:s)|band \(music\)|bass(?:guitar|ist)|berlin international film festival|blockbuster|blu(?:\-ray|\-ray disc|)|blues guitar|box office(?:mojo|)|brass instrument|broadcast(?:er|ing|ed|media)|bugle \(instrument\))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(bafta|bagpipe(?:s)|band \(music\)|bass(?:guitar|ist)|berlin international film festival|blockbuster|blu(?:\-ray|\-ray disc|)|blues guitar|box office(?:mojo|)|brass instrument|broadcast(?:er|ing|ed|media)|bugle \(instrument\))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(cartoon|cassette|cd(?: single)|c\.d\.(?: single)|cdrom|chamber music|chat|choir|cinema of the united states|cnnmoney\.com|comedy(?: film)|comic(?: book|strip)|compact dis[ck](?: single)|concert(?: band|s|)|conducting)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(cartoon|cassette|cd(?: single)|c\.d\.(?: single)|cdrom|chamber music|chat|choir|cinema of the united states|cnnmoney\.com|comedy(?: film)|comic(?: book|strip)|compact dis[ck](?: single)|concert(?: band|s|)|conducting)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(debut album|dell comics|demo \(music\)|digit(?:s|ized|izing|ization|al library)|direct\-to\-video|docudrama|documentary(?: film)|double album|drama(?: film)|dvd(?:\-video| region code|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(debut album|dell comics|demo \(music\)|digit(?:s|ized|izing|ization|al library)|direct\-to\-video|docudrama|documentary(?: film)|double album|drama(?: film)|dvd(?:\-video| region code|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(emmy award(?:s)|entertainment|episode)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(emmy award(?:s)|entertainment|episode)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(facebook|female volcalist|film(?: director |maker|-maker|ography| poster)|flixter|folk music|fresco)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(facebook|female volcalist|film(?: director |maker|-maker|ography| poster)|flixter|folk music|fresco)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(game show|g major|golden globe award|grammy award|guitar(?:ists| music|s))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(game show|g major|golden globe award|grammy award|guitar(?:ists| music|s))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(golden globe award for best (?:costume design|film editing|foreign languge film|original music score|original screenplay|supporting actor \- motion picture|visual effects|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(golden globe award for best (?:costume design|film editing|foreign languge film|original music score|original screenplay|supporting actor \- motion picture|visual effects|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(hd(?:\-dvd| dvd|)|hollywood walk of fame|hugo award)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(hd(?:\-dvd| dvd|)|hollywood walk of fame|hugo award)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(imax)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(imax)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(japanese (?:movie database|academy awards|)|jazz)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(japanese (?:movie database|academy awards|)|jazz)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(keyboard)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(keyboard)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(live (?:action|album)|lp)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(live (?:action|album)|lp)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(marches|mass media|metacritic|metro\-goldwyn\-mayer|mgm|miniseries|movie (?:star|theatre)|mtv|mural|music[ ]*(?:album|record|store|studio|video|)|musical (?:ensemble|group|instrument)|myspace)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(marches|mass media|metacritic|metro\-goldwyn\-mayer|mgm|miniseries|movie (?:star|theatre)|mtv|mural|music[ ]*(?:album|record|store|studio|video|)|musical (?:ensemble|group|instrument)|myspace)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(national film registry|nbc(?:universal|)|nebula award|news media)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(national film registry|nbc(?:universal|)|nebula award|news media)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(opera)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(opera)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(paramount pictures|pdf|pen name|percussion instrument|photography|play|plot|pop[ ]*(?:music|\(music\)|portable document file|singer|song)|porn|pornograph(?:y|ic)|pornographic actor|portable document format|print media|published media)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(paramount pictures|pdf|pen name|percussion instrument|photography|play|plot|pop[ ]*(?:music|\(music\)|portable document file|singer|song)|porn|pornograph(?:y|ic)|pornographic actor|portable document format|print media|published media)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(radio(?:broadcast(?:er|ing)|host|personality|presenter|show|station)|rap music|reality (?:show|television|tv)|record (?:album(?:s)|store)|recording studio|rock (?:anthem|group|music|\(music\)|musician|song))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(radio(?:host|personality|presenter|show|station)|rap music|reality (?:show|television|tv)|record (?:album(?:s)|store)|recording studio|rock (?:anthem|group|music|\(music\)|musician|song))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(saturday night live|science fiction|sci\-fi|screen actors guild|sheet music|silent film|sing(?:er|ing)|sitcom|situation comedy|soap opera|solo \(music\)|sony(?: music|)|soundtrack|spin[ -]?off|sports (?:announcer|commentator)|stage(?: name)|string instrument)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(saturday night live|science fiction|sci\-fi|screen actors guild|sheet music|silent film|sing(?:er|ing)|sitcom|situation comedy|soap opera|solo \(music\)|sony(?: music|)|soundtrack|spin[ -]?off|sports (?:announcer|commentator)|stage(?: name)|string instrument)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(talk(?:show| show)|technicolor|telegraphy|the disney channel|tragedy|turner classic movies|twitter)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(talk(?:show| show)|technicolor|telegraphy|the disney channel|tragedy|turner classic movies|twitter)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(television\s(?:episode|pilot|program|programme|series|film|show|sitcom|studio)|tristar pictures|trombone)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(television\s(?:episode|pilot|program|programme|series|film|show|sitcom|studio)|tristar pictures|trombone)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(tv\s(?:episode|pilot|program|programme|series|film|show|sitcom|studio)|twitter)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(tv\s(?:episode|pilot|program|programme|series|film|show|sitcom|studio))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united artists|universal studios)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united artists|universal studios)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(variety show|vh1|vhs(?:tape)|video(?: cassette|store)|violin|vocal(?:ist|s))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(variety show|vh1|vhs(?:tape)|video(?: cassette|store)|violin|vocal(?:ist|s))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(warner bros\.|widescreen|woodwind instrument(?:s))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(warner bros\.|widescreen|woodwind instrument(?:s))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(you(?:tube| tube))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(you(?:tube| tube))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(20th century fox)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(20th century fox)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})nd academy awards|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})nd academy awards|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})rd academy awards|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})rd academy awards|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})st academy awards|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})st academy awards|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})th academy awards|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})th academy awards|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})nd golden globe awards|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})nd golden globe awards|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})rd golden globe awards|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})rd golden globe awards|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})st golden globe awards|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})st golden globe awards|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})th golden globe awards|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})th golden globe awards|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) in film|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) in film|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) films)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) films)\|([^\]]+?)\]\]", "$3"); // // literary ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:poetry\||)(poe([mt]s?|tic|try))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[hardcover\|(hard ?back|hard ?cover)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:hard|paper)(?:back|cover))(s|)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)Print \(Hard(back|cover) (&|and) Paperback\)", "Print (hardback & paperback)"); ArticleText=Regex.Replace(ArticleText, @"(?i)Print \(Hard(back|cover)\)", "Print (hard$1)"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:fiction(?:al character)?|Character \(arts\))\|(fictional|character)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ballad|book|cartography|cartoon(?:s| character| network|)|code letters|cognate|comic(?: book| strip|)|courtesy name|english heritage|epic poetry|fable|fiction|film director|folk hero|folklore|greek letter|historical novel|humou?rist|internet archive|isbn|literature|lithograph|non.fiction|magazine|manuscript|mein kampf|memoir|mythology|proofread|pulitzer prize|pun|revised romanization|screenplay|short story|sic|transliteration|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ballad|book|cartography|cartoon(?:s| character| network|)|code letters|cognate|comic(?: book| strip|)|courtesy name|english heritage|epic poetry|fable|fiction|film director|folk hero|folklore|greek letter|historical novel|humou?rist|internet archive|isbn|literature|lithograph|non.fiction|magazine|manuscript|mein kampf|memoir|mythology|proofread|pulitzer prize|pun|revised romanization|screenplay|short story|sic|transliteration|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:essay\||)(essays?|essayists?)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:comedy\||)(comedy|comedies|comics?|comedians?|comediennes?)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:(?:novel|novella)\||)(novel|novella|novell?ist)(s|)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:write\||)(writ(?:|e|er|ers|ing))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(argument|creative writ(?:er|ing|)|grammar|logic|rhetoric)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(kanji|wade\-giles|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(kanji|wade\-giles|)\]\]", "$1"); // //Books ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(history of united states naval operations in world war ii)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(history of united states naval operations in world war ii)\]\]", "$1"); // // // lifestyle & religion ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(agnostic(?:s|ism|)|alcohol(?:ism|ic|ic beverage)|alderman|anglican|anniversary|anti\-religious|arab(?:s|ic|)|ascension of jesus|ath[ei](?:ist|ism|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(agnostic(?:s|ism|)|alcohol(?:ism|ic|ic beverage)|alderman|anglican|anniversary|anti\-religious|arab(?:s|ic|)|ascension of jesus|ath[ei](?:ist|ism|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(baha\'i(?: faith|)|bapt(?:ist|ism|)|bar|beer|bible|birthday|bisexual|(?:arch|)bishop|blasphemy|bread|brew(?:ery|ing|)|buddh(?:a|ist|ism)|burial)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(baha\'i(?: faith|)|bapt(?:ist|ism|)|bar|beer|bible|birthday|bisexual|(?:arch|)bishop|blasphemy|bread|brew(?:ery|ing|)|buddh(?:a|ist|ism)|burial)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(caf[eé]|cake|cardinal|cathedral|cemeter(?:y|ies)|cheese|christendom|christian(?:ization| denomination| scientist)|church of (?:england|scotland|)|churches of (?:christ|)|clergy|coming out|confucian|convent|corpus christi \(feast\))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(caf[eé]|cake|cardinal|cathedral|cemeter(?:y|ies)|cheese|christendom|christian(?:ization| denomination| scientist)|church of (?:england|scotland|)|churches of (?:christ|)|clergy|coming out|confucian|convent|corpus christi \(feast\))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(damnation|deacon|demagog(?:e|y|)|dominican order)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(damnation|deacon|demagog(?:e|y|)|dominican order)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(epiphany \(holiday\)|episcopal church \(united states\)|episcopal church in the united states of america|exercise)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(epiphany \(holiday\)|episcopal church \(united states\)|episcopal church in the united states of america|exercise)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(fast food|fasting|fat|franciscan|freedom of religion|freethought|friar|funeral)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(fast food|fasting|fat|franciscan|freedom of religion|freethought|friar|funeral)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gays?|ghetto|god(?:dess|s|)|grave(?:yard|site|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gays?|ghetto|god(?:dess|s|)|grave(?:yard|site|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(hajj(?:i|)|heresy|hind[iu](?:sm|)|holy roman emperor|holy see|holy water|homosexual(?:ity|)|human rights watch)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(hajj(?:i|)|heresy|hind[iu](?:sm|)|holy roman emperor|holy see|holy water|homosexual(?:ity|)|human rights watch)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ideology|imam|immaculate conception|incense|indulgence|irish catholic|irreligio(?:n|us|)|islam(?:ist|ic))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ideology|imam|immaculate conception|incense|indulgence|irish catholic|irreligio(?:n|us|)|islam(?:ist|ic))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(jehovah\'s witness|jesuit|jesus|jesus christ|jewish virtual library|justice of the peace)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(jehovah\'s witness|jesuit|jesus|jesus christ|jewish virtual library|justice of the peace)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(latter\-day saint|lesbian|lutheran|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(latter\-day saint|lesbian|lutheran|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(magic \(paranormal\)|marriage(?: licen[cs]e| certificate| \(u\.s\. census\))|marr(?:ies|y)|masonic lodge|mass \(liturgy\)|mecca|memorial|mennonite|menorah \(temple\)|methodist(?: episcopal church)|minister|missionar(?:ies|y)|mon(?:k|astery|astic|astic name|)|monsignor|mormon|moslem|mosque|multi-?cultural|muslim(?:s|)|mysticism|mythology)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(magic \(paranormal\)|marriage(?: licen[cs]e| certificate| \(u\.s\. census\))|marr(?:ies|y)|masonic lodge|mass \(liturgy\)|mecca|memorial|mennonite|menorah \(temple\)|methodist(?: episcopal church)|minister|missionar(?:ies|y)|mon(?:k|astery|astic|astic name|)|monsignor|mormon|moslem|mosque|multi-?cultural|muslim(?:s|)|mysticism|mythology)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(non\-religious|nun|nutrition)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(non\-religious|nun|nutrition)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ordained|other religions|orthodox church)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ordained|other religions|orthodox church)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(papa(?:cy|l|l legate)|pastor|patriarch|patron saint|pentecostal|pilgrim(?:s|age|)|pope|posslq|presbyterian(?:s)|priest|priory|protestant reformation|puritan|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(papa(?:cy|l|l legate)|pastor|patriarch|patron saint|pentecostal|pilgrim(?:s|age|)|pope|posslq|presbyterian(?:s)|priest|priory|protestant reformation|puritan|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(quaker(?:s)|qur(?:\'an|an))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(quaker(?:s)|qur(?:\'an|an))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(rabbi|race \(united states census\)|racis[mt]|ramadan|rector \(ecclesiastical\)|refuge|religion|religious(?:conversion|society of friends|)|renaissance|restaurant|roman catholic church in scotland|russian orthodox church|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(rabbi|race \(united states census\)|racis[mt]|ramadan|rector \(ecclesiastical\)|refuge|religion|religious(?:conversion|society of friends|)|renaissance|restaurant|roman catholic church in scotland|russian orthodox church|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(sacrifice|salvation|same\-sex partnerships|sarcophagus|scientology|scottish rite|seminary|sin|sharia(?: law|)|shia(?: islam|)|shiite|shinto|shrine|sikh(?:ism|ist|)|smoking|society of jesus|spirit|sufi(?:ism|)|sunni(?:s| islam|)|supernatural)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(sacrifice|salvation|same\-sex partnerships|sarcophagus|scientology|scottish rite|seminary|sin|sharia(?: law|)|shia(?: islam|)|shiite|shinto|shrine|sikh(?:ism|ist|)|smoking|society of jesus|spirit|sufi(?:ism|)|sunni(?:s| islam|)|supernatural)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(temple name|the church of jesus christ of latter\-day saints|theology|transgender|travel|tribute|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(temple name|the church of jesus christ of latter\-day saints|theology|transgender|travel|tribute|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united methodist)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united methodist)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(vegetarian(?:s|ism|)|vicar)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(vegetarian(?:s|ism|)|vicar)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(wine)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(wine)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[multiculturalism\|(multicultural)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[vegetarianism\|(vegetarians?)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:christianity\||)(christians?|christianity|christian\sethic|christian\sfaith)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:(?:roman\s|)catholic(?:\schurch|ism|)\||)((?:roman\s|)catholic(?:\schurch|ism|s?))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:(?:jews|judaism)\||)(jews?|jewish|judaism)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:(?:jews|judaism)\||)(jews?|jewish|judaism)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(festival|circus)(s|)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:child|)birth|pregnancy|rape)(s|)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:marriage|divorce)\|([^\]]{1,15})\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:married and |)maiden names?\|(née)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(marry|marries|married|married\scouples?|maiden name|née|wedding)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(divorce[des]?)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:egyptian|greek|roman|) mythology)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:egyptian|greek|roman|) mythology)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:agnostic|baptist|catholic|christian|eastern orthodox|episcopal|jewish|methodist|serbian orthodox|united methodist|protestant|) church)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:agnostic|baptist|catholic|christian|eastern orthodox|episcopal|jewish|methodist|serbian orthodox|united methodist|protestant|) church)\]\]", "$1"); // //business ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(american (?:|jewish committee|)|board of directors|CEO|censorship|chief executive officer|chair(?:m[ae]n|person)|chair \(official\)|credit(?:er| card| check|)|director|driver(?:s|s license|\'s license)|entrepreneur|executive|fax|feature(?:phone)|federation of american scientists|i(?:os|phone)|lease|passport|personal union|president|real estate|smartphone|tax(?:es|ation)|treaty|trust(?:ed|ing|ee|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(american (?:|jewish committee|)|board of directors|CEO|censorship|chief executive officer|chair(?:m[ae]n|person)|chair \(official\)|credit(?:er| card| check|)|director|driver(?:s|s license|\'s license)|entrepreneur|executive|fax|feature(?:phone)|federation of american scientists|i(?:os|phone)|lease|passport|personal union|president|real estate|smartphone|tax(?:es|ation)|treaty|trust(?:ed|ing|ee|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:business(?:person|)\||)(business(?:m[ae]n|person|es|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:private(?:ly held|) |public |listed |quoted |)(?:company|corporation))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:private(?:ly held|) |public |listed |quoted )company)\|(private|public|listed|quoted)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[chief (?:executive|financial|operating) officer\|(C[EFO]O|C\.[EFO]\.O\.|chief executive)\]\]", "$1"); // // companies ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(aeg|ag vulcan|air france|apple(?: inc\.|)|adobe|amazon(?:\.com|)|amoco|atlantic basin iron works|avia|avro|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(aeg|ag vulcan|air france|apple(?: inc\.|)|adobe|amazon(?:\.com|)|amoco|atlantic basin iron works|avia|avro|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(babcock and wilcox|barclay curle|bath iron works|beechcraft|bethlehem(?:\-hingham shipyard| steel|)|blackberry|blackburn aircraft|blohm \& voss|bmw|bombardier aerospace|bp|brett brothers|british airways|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(babcock and wilcox|barclay curle|bath iron works|beechcraft|bethlehem(?:\-hingham shipyard| steel|)|blackberry|blackburn aircraft|blohm \& voss|bmw|bombardier aerospace|bp|brett brothers|british airways|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(camper \& nicholson|canadian vickers|caterpillar inc\.|caudron|cessna|consolidated (?:aircraft|steel)|convair|cummins|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(camper \& nicholson|canadian vickers|caterpillar inc\.|caudron|cessna|consolidated (?:aircraft|steel)|convair|cummins|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(daimler\-benz|dc comics|de havilland|disney|dornier flugzeugwerke|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(daimler\-benz|dc comics|de havilland|disney|dornier flugzeugwerke|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(electric boat(?: co\.|)|english electric|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(electric boat(?: co\.|)|english electric|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(fairbanks\-morse|farman(?: aviation works|)|ford (?:motor company|foundation|)|fore river ship(?:building|yard|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(fairbanks\-morse|farman(?: aviation works|)|ford (?:motor company|foundation|)|fore river ship(?:building|yard|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ge|general (?:dynamics|dynamics electric boat|electric|engineering \& drydock company|mills|motors|motors corporation)|germaniwerft|globe iron works|gmail|google(?: books|earth|maps|scholar|)|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ge|general (?:dynamics|dynamics electric boat|electric|engineering \& drydock company|mills|motors|motors corporation)|germaniwerft|globe iron works|gmail|google(?: books|earth|maps|scholar|)|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(harland and wolff|harland \& wolff|hawker aircraft|hawthorn leslie and company|holland \& holland|holland and holland|hotmail|hughes aircraft|huntington ingalls industries|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(harland and wolff|harland \& wolff|hawker aircraft|hawthorn leslie and company|holland \& holland|holland and holland|hotmail|hughes aircraft|huntington ingalls industries|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(imdb|intermarine usa|iphone\s(?:3|3g|4|location services|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(imdb|intermarine usa|iphone\s(?:3|3g|4|location services|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(j\.l\. thompson|john (?:brown \& company|roach \& sons|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(j\.l\. thompson|john (?:brown \& company|roach \& sons|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(kaiser shipyards|kaiserliche werft kiel|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(kaiser shipyards|kaiserliche werft kiel|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(l\-3 communications|lake torpedo boat|laird brothers|lawrence livermore national laboratory|ling\-temco\-vought|lithgows|litton industries|lockheed(?: corporation| martin|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(l\-3 communications|lake torpedo boat|laird brothers|lawrence livermore national laboratory|ling\-temco\-vought|lithgows|litton industries|lockheed(?: corporation| martin|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(man se|marinette marine|marriott international|mcdonnell (?:aircraft|douglas|)|mercedes\-benz|microsoft(?: windows|)|mitsubishi(?: heavy industries|)|morane\-saulnier|moscow metro|mtu friedrichshafen|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(man se|marinette marine|marriott international|mcdonnell (?:aircraft|douglas|)|mercedes\-benz|microsoft(?: windows|)|mitsubishi(?: heavy industries|)|morane\-saulnier|moscow metro|mtu friedrichshafen|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(national steel and shipbuilding|norddeutscher lloyd|north american (?:aviation|smelting|)|northrop (?:grumman|grumman shipbuilding|grumman newport news|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(national steel and shipbuilding|norddeutscher lloyd|north american (?:aviation|smelting|)|northrop (?:grumman|grumman shipbuilding|grumman newport news|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(oldsmobile|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(oldsmobile|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(packard|parsons marine steam turbin(?:es|e company|)|pembroke dockyard|pratt & whitney|pws \(aircraft manufacturer\))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(packard|parsons marine steam turbin(?:es|e company|)|pembroke dockyard|pratt & whitney|pws \(aircraft manufacturer\))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(qantas|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(qantas|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(rca|rolls\-royce limited|royal dutch shell|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(rca|rolls\-royce limited|royal dutch shell|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(san diego marine construction|seattle\-tacoma shipbuilding|siemens(?:\-schuckert|)|short brothers|sikorsky aircraft|skinner \& eddy|sra international|standard oil|sun shipbuilding \& drydock co\.|sunderland\, tyne and wear|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(san diego marine construction|seattle\-tacoma shipbuilding|siemens(?:\-schuckert|)|short brothers|sikorsky aircraft|skinner \& eddy|sra international|standard oil|sun shipbuilding \& drydock co\.|sunderland\, tyne and wear|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(target stores|telstra|tenix|texas instruments|time warner|todd pacific shipyards|trans\-siberian railway|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(target stores|telstra|tenix|texas instruments|time warner|todd pacific shipyards|trans\-siberian railway|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(union iron works|united fruit|usaa|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(union iron works|united fruit|usaa|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(verizon|viatel|vickers\-armstrong‏|vodafone|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(verizon|viatel|vickers\-armstrong|vodafone|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(walt disney pictures|westinghouse(?: electric corporation|)|wikileaks|william (?:cramp and sons|cramp \& sons|denny and brothers|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(walt disney pictures|westinghouse(?: electric corporation|)|wikileaks|william (?:cramp and sons|cramp \& sons|denny and brothers|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(yahoo(?:\!| finance|\! messenger|messenger| news|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(yahoo(?:\!| finance|\! messenger|messenger| news|))\|([^\]]+?)\]\]", "$2"); //All other companies ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:american|continental|delta|pan american|united|) airlines)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:american|continental|delta|pan american|united|) airlines)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ailsa shipbuilding|allison engine|american bridge|basalt rock|bethlehem (?:shipbuilding|steel|)|bristol aeroplane|caledonian steam packet|charles connell and|chicago bridge \& iron|electric boat|emerson electric|fairfield shipbuilding and engineering|fairey aviation|federal shipbuilding and dry(?:dock| dock|)|general engineerinng \& dry dock|glenn l\. martin|goodyear aircraft|hawthorn leslie and|holmes motor|hudson\'s bay|isle of man steam packet|john brown and|little\, brown and|matthews boat|mcfarland \&|nakajima aviation|national steel and shipbuilding|newport news shipbuilding and drydock|seattle construction and drydock|sun shipbuilding and drydock|thames ironworks and shipbuilding|walsh\-kaiser|western pipe and steel|william hamilton and|) company)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ailsa shipbuilding|allison engine|american bridge|basalt rock|bethlehem (?:shipbuilding|steel|)|bristol aeroplane|caledonian steam packet|charles connell and|chicago bridge \& iron|electric boat|emerson electric|fairfield shipbuilding and engineering|fairey aviation|federal shipbuilding and dry(?:dock| dock|)|general engineerinng \& dry dock|glenn l\. martin|goodyear aircraft|hawthorn lesley and|holmes motor|hudson\'s bay|isle of man steam packet|john brown and|little\, brown and|matthews boat|mcfarland \&|nakajima aviation|national steel and shipbuilding|newport news shipbuilding and drydock|seattle construction and drydock|sun shipbuilding and drydock|thames ironworks and shipbuilding|walsh\-kaiser|western pipe and steel|william hamilton and|) company)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bethlehem (?:shipbuilding|steel|)|british overseas airways|consolidated steel|dravo|ihi|new york shipbuilding|rand|sperry|) corporation)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bethlehem (?:shipbuilding|steel|)|british overseas airways|consolidated steel|dravo|ihi|new york shipbuilding|rand|sperry|) corporation)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:british|dutch|hon[o|ou]rable|)[ ]*east india company)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:british|dutch|hon[o|ou]rable|)[ ]*east india company)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:american|australian national|cunard|federal|hamburg america|holland america|red star|united states|ward|white star|) line(?:s|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:american|australian national|cunard|federal|hamburg america|holland america|red star|united states|ward|white star|) line(?:s|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:baltimore and ohio|burlington northern|canadian pacific|union pacific|virginia central|) railroad)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:baltimore and ohio|burlington northern|canadian pacific|union pacific|virginia central|) railroad)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:baltimore and ohio|burlington northern|canadian pacific|union pacific|) railway)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:baltimore and ohio|burlington northern|canadian pacific|union pacific|) railway)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:brown|burntisland|california|cramp|defoe|essington|federal|globe|grumman|gulf|ingalls|newport news|new york|tampa|todd|yarrow) ship(?:builders|building|yard|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:brown|burntisland|california|cramp|defoe|essington|federal|globe|grumman|gulf|ingalls|newport news|new york|tampa|todd|yarrow) ship(?:builders|building|yard|))\]\]", "$1"); // // buildings structure and environment ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:basement|bath|bathroom|ceiling|fixture|fitting|kitchen|shower|toilet|wall))\|([^\]]+?)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:basement|bath|bathroom|ceiling|fixture|fitting|kitchen|shower|toilet|wall))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ashlar|baroque architecture|breakwater \(structure\)|canmore|château|cupola|gilding|historic american buildings survey|historic landmark|italian renaissance|land reclamation|lighthouse|list of palaces and manor houses in latvia|listed building|louvre|manor house|metropolitan museum of art|monument historique|national historic sites \(united states\)|neolithic|novodevichy cemetery|palace of (?:westminster|whitehall)|scheduled (?:ancient monument|monument|)|st paul\'s cathedral|stained glass|statue of liberty|times square|winter palace|world trade center)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ashlar|baroque architecture|breakwater \(structure\)|canmore|château|cupola|gilding|historic american buildings survey|historic landmark|italian renaissance|land reclamation|lighthouse|list of palaces and manor houses in latvia|listed building|louvre|manor house|metropolitan museum of art|monument historique|national historic sites \(united states\)|neolithic|novodevichy cemetery|palace of (?:westminster|whitehall)|scheduled (?:ancient monument|monument|)|st paul\'s cathedral|stained glass|statue of liberty|times square|winter palace|world trade center)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:gothic|neoclassical|norman|romanesque|) architecture)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:gothic|neoclassical|norman|romanesque|) architecture)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(architect(?:ure|)|chapel|churche?|fa[cç]ade|furniture|garden(?:ing|)|hospital|home|hotel|hous(?:e|ing)|museum|neighbou?rhood|park|roof|shop(?:ping mall|ping arcade|)|stadium|skyscraper|interior design(?:er|))(s|)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[church \(building\)\|(church)(es|)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(brick|building|composite|cement|concrete|environment|foundation|glass|steel|structure|wood)(s|)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(dam|port|bridge|metro( station|)|reservoir|road|street|traffic|tunnel|underground|(?:high|free|motor)way)(s|)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(central business district|down[ -]?town)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[central business district\|(CBD)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:bus|metro|railway|tube|underground)(?: stop| station)\|(station)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(hollywood cemetery \(richmond\, virginia\))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(hollywood cemetery \(richmond\, virginia\))\]\]", "$1"); // //Crime & legal ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(admission to the bar in the united states|american (?:bar association|civil liberties union|)|appeasement|arbitrat(?:e|or|ion|)|arrest|arson(?:ist|)|assault \(tort\)|attorney(?: general|)|authority|avalon project)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(admission to the bar in the united states|american (?:bar association|civil liberties union|)|appeasement|arbitrat(?:e|or|ion|)|arrest|arson(?:ist|)|assault \(tort\)|attorney(?: general|)|authority|avalon project)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(bailiff|bankrupt(?:cy|cy court|ed|)|bar association|battery \(tort\)|bounty \(reward\)|brothel|burglar(?:s|y|ie|ies))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(bailiff|bankrupt(?:cy|cy court|ed|)|bar association|battery \(tort\)|bounty \(reward\)|brothel|burglar(?:s|y|ie|ies))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(capital punishment|case law|chief justice(?: of the united states)|civil (?:disobedience|law \(common law\)|liberties|rights|)|cocaine|common law|commutation of sentence|conspiracy \(crime\)|constable|cortes generales|(?:crime|crimes) against humanity|criminal law|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(capital punishment|case law|chief justice(?: of the united states)|civil (?:disobedience|law \(common law\)|liberties|rights|)|cocaine|common law|commutation of sentence|conspiracy \(crime\)|constable|cortes generales|(?:crime|crimes) against humanity|criminal law)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(damages|dea|de facto|de jure|defendant|deputy sheriff|distric attorney|doctor of laws|drug enforcement administration|drug traffick(?:er|ers|ing|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(damages|dea|de facto|de jure|defendant|deputy sheriff|distric attorney|doctor of laws|drug enforcement administration|drug traffick(?:er|ers|ing|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(fbi|felony|firing squad|forger(?:y|ie|er|ers|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(fbi|felony|firing squad|forger(?:y|ie|er|ers|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gambl(?:e|ing|er|)|garda síochána|grand jury|gulag)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gambl(?:e|ing|er|)|garda síochána|grand jury|gulag)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(habeas corpus|heroin|high court|hostage|house arrest)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(habeas corpus|heroin|high court|hostage|house arrest)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(indictment|internal revenue service|international (?:court|criminal court|humanitarian law‏‎|)|interpol|islamic law)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(indictment|internal revenue service|international (?:court|criminal court|humanitarian law|)|interpol|islamic law)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(judiciary|judge|jurisprudence)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(judiciary|judge|jurisprudence)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(kidnapp(?:er|ed|ing|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(kidnapp(?:er|ed|ing|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(law[ ]*(?:court|degree|enforcement agency|of the united states|s|yer|firm|suit|)|legal|lend\-lease act|letters patent|life (?:imprisonment|sentence))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(law[ ]*(?:court|degree|enforcement agency|of the united states|s|yer|firm|suit|)|legal|lend\-lease act|letters patent|life (?:imprisonment|sentence))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(morale|murder(?:er|ers|s|ing|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(morale|murder(?:er|ers|s|ing|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(national police agency \(republic of china\))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(national police agency \(republic of china\))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(organized crime)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(organized crime)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(pardon|penal (?:code|law|)|phone(?:s| call|)|plaintiff|philippine national police|practice of law|primogeniture|prison(?:s|er|ers| riot|)|private law|prohibition(?: in the united states)|property law|public law)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(pardon|penal (?:code|law|)|phone(?:s| call|)|plaintiff|philippine national police|practice of law|primogeniture|prison(?:s|er|ers| riot|)|private law|prohibition(?: in the united states)|property law|public law)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(regicide|regulation|religious law|riot control|robber(?:y|ie)|roman law|rule of law)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(regicide|regulation|religious law|riot control|robber(?:y|ie)|roman law|rule of law)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(salic law|sheriff|shoot(?:s|er|es|ing|)|smuggling|state police|subpoena|swat)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(salic law|sheriff|shoot(?:s|er|es|ing|)|smuggling|state police|subpoena|swat)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(testimony|theft(?:s)|trademark|treason|torture|trial (?:in absentia|lawyers for public justice|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(testimony|theft(?:s)|trademark|treason|torture|trial (?:in absentia|lawyers for public justice|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united states (?:attorney general|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united states (?:attorney general|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(volksgerichtshof)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(volksgerichtshof)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(war on drugs)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(war on drugs)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(arrest|trial|[bj]ail|execution|firing squad)(s|)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:Capital punishment\||)(Capital punishment|death(?: penalty|)|execut(?:ions?|ed?))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|) court of appeals)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|) court of appeals)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|) supreme court)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|) supreme court)\]\]", "$1"); // // biology, medical ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(aids|alzheimer\'s disease|ambulance|amputation|anatomy|ankle|antibiotic|arm|anthrax|append[ei](?:x|citis|ctimy|)|asphyxiation|asthma|autops(?:y|ies|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(aids|alzheimer\'s disease|ambulance|amputation|anatomy|ankle|antibiotic|arm|anthrax|append[ei](?:x|citis|ctimy|)|asphyxiation|asthma|autops(?:y|ies|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(bacteri(?:um|a)|biochemistry|black death|bleed(?:ing|)|blind(?:ed|ing|s|ness|)|blood|brain(?: cancer| damage| tumor| tumour|)|breast cancer|breath(?:ing|)|bubonic plague|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(bacteri(?:um|a)|biochemistry|black death|bleed(?:ing|)|blind(?:ed|ing|s|ness|)|blood|brain(?: cancer| damage| tumor| tumour|)|breast cancer|breath(?:ing|)|bubonic plague|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(cadavar|cardiac arrest|chemist|chest|cholera|clinical depression|colon cancer|coma|cough|cremat(?:e|ed|ion|orium|)|crop|cyanide|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(cadavar|cardiac arrest|chemist|chest|cholera|clinical depression|colon cancer|coma|cough|cremat(?:e|ed|ion|orium|)|crop|cyanide|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(death|decapitation|decompos(?:e|ed|ing|ition|)|dehydration|depression|diabetes|diarrhea|diet of japan|disease|dispensary|diphtheria|dna|doctor|doctrine|down syndrome|drug|drown(?:ed|ing|)|drug(?: overdose|)|duodenum|dysentery)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(death|decapitation|decompos(?:e|ed|ing|ition|)|dehydration|depression|diabetes|diarrhea|diet of japan|disease|dispensary|diphtheria|dna|doctor|doctrine|down syndrome|drug|drown(?:ed|ing|)|drug(?: overdose|)|duodenum|dysentery)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ear|elbow|epidemic|epidemiology|evolution|eye)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ear|elbow|epidemic|epidemiology|evolution|eye)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(face|female(?:s|)|femur|fertility|fever|finger|flu|foot|fossil(?:s|)|fractures?|frostbite|fung(?:us|i))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(face|female(?:s|)|femur|fertility|fever|finger|flu|foot|fossil(?:s|)|fractures?|frostbite|fung(?:us|i))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gall bladder|gangrene|gender|gender identity|gene|genetics|gout|gunshot wounds?)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gall bladder|gangrene|gender|gender identity|gene|genetics|gout|gunshot wounds?)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(hand|hair|hallucination|hang(?:ing|)|head(?:ache|)|health(?: care|y|)|heart(?: attack| disease| failure|)|hernia|hiv|hospital|human skull|hunger|hygiene|hypothermia|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(hand|hair|hallucination|hang(?:ing|)|head(?:ache|)|health(?: care|y|)|heart(?: attack| disease| failure|)|hernia|hiv|hospital|human skull|hunger|hygiene|hypothermia|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(immuniz(?:e|ation|ed|)|incest|infect(?:ed|ion|ing|ious disease)|influenza|injur(?:y|ies)|inoculat(?:e|ed|ion|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(immuniz(?:e|ation|ed|)|incest|infect(?:ed|ion|ing|ious disease)|influenza|injur(?:y|ies)|inoculat(?:e|ed|ion|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(kidney(?: stone|)|knee|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(kidney(?: stone|)|knee|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(lead poisoning|leg|leukemia|liver|lung cancer)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(lead poisoning|leg|leukemia|liver|lung cancer)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(malaria|male(?:s|)|malnutrition|mandible|mastectomy|mausoleum|measles|medic(?:aid|ation|ine|al|al license|al doctor)|mental health|microscope|morgue|morphine|mortally wounded|mouth|myocardial infarction)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(malaria|male(?:s|)|malnutrition|mandible|mastectomy|mausoleum|measles|medic(?:aid|ation|ine|al|al license|al doctor)|mental health|microscope|morgue|morphine|mortally wounded|mouth|myocardial infarction)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(narcotic|national institutes of health|nurse)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(narcotic|national institutes of health|nurse)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(obesity|obituary|opium|oxygen|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(obesity|obituary|opium|oxygen|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(pancreatic cancer|patient(?:s|)|peptic ulcer|peritonitis|pharmacy|photochemical|physical (?:chemistry|fitness|)|physician|physiology|plague \(disease\)|pneumonia|poison gas|polio|prostate cancer|psychology|pupil|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(pancreatic cancer|patient(?:s|)|peptic ulcer|peritonitis|pharmacy|photochemical|physical (?:chemistry|fitness|)|physician|physiology|plague \(disease\)|pneumonia|poison gas|polio|prostate cancer|psychology|pupil|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(quarantine(?:d|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(quarantine(?:d|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(red cross|retina|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(red cross|retina|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(scalp(?:ing|)|scarlet fever|scientific|scurvy|search and rescue(?:canada|)|searchlight|sedative|sepsis|sexual orientation|shock|skelet(?:on|al|)|skin|smallpox|smallpox(?: vaccine)|spanish influenza|species|spleen|starvation|stroke|suicide|sunburn|surgeon(?: general| general of the united states|)|surgery)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(scalp(?:ing|)|scarlet fever|scientific|scurvy|search and rescue(?:canada|)|searchlight|sedative|sepsis|sexual orientation|shock|skelet(?:on|al|)|skin|smallpox|smallpox(?: vaccine)|spanish influenza|species|spleen|starvation|stroke|suicide|sunburn|surgeon(?: general| general of the united states|)|surgery)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(throat(?: cancer|)|thrombosis|thumb|thyroid|tobacco smoking|toe|tuberculosis|typhoid(?: fever|)|typhus)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(throat(?: cancer|)|thrombosis|thumb|thyroid|tobacco smoking|toe|tuberculosis|typhoid(?: fever|)|typhus)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(umbilical cord|urin(?:e|ary|ary tract|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(umbilical cord|urin(?:e|ary|ary tract|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(viruse?|volunteer(?:s|)|vomit(?:ing|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(viruse?|volunteer(?:s|)|vomit(?:ing|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(waist|wheel(?:chair| chair|chairs|)|wrist)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(waist|wheel(?:chair| chair|chairs|)|wrist)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(x\-ray)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(x\-ray)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(yellow fever)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(yellow fever)\]\]", "$1"); // //Compounds ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(aluminum alloy|bacillus anthracis|beryllium|carbon (?:dioxide|steel)|(?:carbon|chlorine|) monoxide|chlorine|duralumin|helium|hydrogen (?:peroxide|sulfide)|methane|nitrous oxide|polymer|potassium nitrate|radon|trinitrotoluene|zirconium dioxide)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(aluminum alloy|bacillus anthracis|beryllium|carbon (?:dioxide|steel)|(?:carbon|chlorine|) monoxide|chlorine|duralumin|helium|hydrogen (?:peroxide|sulfide)|methane|nitrous oxide|polymer|potassium nitrate|radon|trinitrotoluene|zirconium dioxide)\|([^\]]+?)\]\]", "$2"); // // Technology ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(air\-cooled|alternating current|alternator|automotive|battery \(electricity\)|boiler|bolt\-action|brake(?: horsepower|)|bristol (?:mercury|pegasus)|bulldozer|cantilever(?:\#in aircraft|)|carbon steel|chassis|chief of engineers|combustion(?: chamber)|composite material|compressed air|construction total loss|conventional undercarriage|coolant|cots|crane \(machine\)|crankshaft|clinder block|degaussing|diesel\-electric transmission|diesel(?:\-electric| engines| fuel| oil)|electromagnetic pulse|engineer)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(air\-cooled|alternating current|alternator|automotive|battery \(electricity\)|boiler|bolt\-action|brake(?: horsepower|)|bristol (?:mercury|pegasus)|bulldozer|cantilever(?:\#in aircraft|)|carbon steel|chassis|chief of engineers|combustion(?: chamber)|composite material|compressed air|construction total loss|conventional undercarriage|coolant|cots|crane \(machine\)|crankshaft|clinder block|degaussing|diesel\-electric transmission|diesel(?:\-electric| engines| fuel| oil)|electromagnetic pulse|engineer)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(flir|four\-wheel drive|free electron laser|forward looking infrared|fuel injection|gas (?:bearing|compressor|)|general electric lm2500|gravity|guillotine|gyrocompass|high frequency|hydraulic|hydrographic survey|hydraulics|i\-beam|i band|ignition magneto|indicated horsepower|infrared(?:sensor|)|infrastructure|kinetic energy|laser(?: rangefinder|)|locomotive|micro(?:processor)|nacelle|night vision|nuclear (?:fission|fuel|fusion|power|powered|test|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(flir|four\-wheel drive|free electron laser|forward looking infrared|fuel injection|gas (?:bearing|compressor|)|general electric lm2500|gravity|guillotine|gyrocompass|high frequency|hydraulic|hydrographic survey|hydraulics|i\-beam|i band|ignition magneto|indicated horsepower|infrared(?:sensor|)|infrastructure|kinetic energy|laser(?: rangefinder|)|locomotive|micro(?:processor)|nacelle|night vision|nuclear (?:fission|fuel|fusion|power|powered|test|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(operating system|optical telescope|optics|paxman \(engines\)|phased array|physicist|power (?:plant|supply)|pratt \& whitney r\-(?:1340|1830)|prototype|power station|pusher configuration|r\&d|radiator|radiator \(engine cooling\)|rivet|roll\-on\/roll\-off|rolls\-royce kestrel|rudder|rugged computer|sight \(device\)|solar power|spark plug|steam(?:ship|)|steam[ ]+(?:locomotive|power|turbines|)|strut|super(?:charger|charged|sonic|)|technical drawing|technology|telecommunication|torsion bar|tricycle gear|turbo(?:charger|\-electric|\-electric transmission|)|uhf|undercarriage|vehicle|vhf|volts|wright r\-1820|yarrow boiler(?:s|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(operating system|optical telescope|optics|paxman \(engines\)|phased array|physicist|power (?:plant|supply)|pratt \& whitney r\-(?:1340|1830)|prototype|power station|pusher configuration|r\&d|radiator|radiator \(engine cooling\)|rivet|roll\-on\/roll\-off|rolls\-royce kestrel|rudder|rugged computer|sight \(device\)|solar power|spark plug|steam(?:ship|)|steam[ ]+(?:locomotive|power|turbines|)|strut|super(?:charger|charged|sonic|)|technical drawing|technology|telecommunication|torsion bar|tricycle gear|turbo(?:charger|\-electric|\-electric transmission|)|uhf|undercarriage|vehicle|vhf|volts|wright r\-1820|yarrow boiler(?:s|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:aircraft|air\-cooled|diesel(?:\-electric|)|double expansion|electric|gasoline|heat|hyper|internal combustion|jet|petrol|piston|piston\-|radial|radiator \(engine cooling\)|reciprocating|rotary|steam|triple-expansion steam|triple expansion(?: steam|)|trunk|V(?:6|8|12|16|)|) engine)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:aircraft|air\-cooled|diesel(?:\-electric|)|double expansion|electric|gasoline|heat|hyper|internal combustion|jet|petrol|piston|piston\-|radial|radiator \(engine cooling\)|reciprocating|rotary|steam|triple-expansion steam|triple expansion(?: steam|)|trunk|V(?:6|8|12|16|)|) engine)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(g\-force|satellite)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(g\-force|satellite)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:diesel|electric|electrical|steam|) generator)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:diesel|electric|electrical|steam|) generator)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(list of aircraft engines)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(list of aircraft engines)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:diesel|electric|electrical|steam|) motor)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:diesel|electric|electrical|steam|) motor)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:diesel|electric|gas|steam|wind|) turbine)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:diesel|electric|gas|steam|wind|) turbine)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(atari|commodore 64|flixster|lan|nintendo(?: ds| entertainment system| gamecube|)|pc(?: card|game)|personal computer|playstation(?: 1| 2| 3| 4|)|ps(?:2|3|4)|pentium(?:ii|iii|iv|v)|sega|usb|xbox(?: one| 360|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(atari|commodore 64|flixster|lan|nintendo(?: ds| entertainment system| gamecube|)|pc(?: card|game)|personal computer|playstation(?: 1| 2| 3| 4|)|ps(?:2|3|4)|pentium(?:ii|iii|iv|v)|sega|usb|xbox(?: one| 360|))\|([^\]]+?)\]\]", "$2"); // // Space ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(apollo (?:(\d{1,1})|(\d{1,2})|command\/service module)|ares (?:i|ii|iii|iv|v|iv)|astronaut)\|([^\]]+?)\]\]", "$4"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(apollo (?:(\d{1,1})|(\d{1,2})|command\/service module)|ares (?:i|ii|iii|iv|v|iv)|astronaut)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(constellation program|cosmonaut)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(constellation program|cosmonaut)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(earth|expedition 6|extra\-vehicular activity)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(earth|expedition 6|extra\-vehicular activity)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gemini (?:(\d{1,1})|(\d{1,2})))\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gemini (?:(\d{1,1})|(\d{1,2})))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(human spaceflight)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(human spaceflight)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(international (?:designator|space station|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(international (?:designator|space station|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(jupiter)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(jupiter)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(launch vehicle|list of kosmos satellites \(2251\–2500\)|low earth orbit|lunar (?:module|orbit|rover))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(launch vehicle|list of kosmos satellites \(2251\–2500\)|low earth orbit|lunar (?:module|orbit|rover))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(mars|medium earth orbit|mir|molniya orbit|moon)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(mars|medium earth orbit|mir|molniya orbit|moon)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(nasa(?: ames research center| astronaut corps|)|national (?:air and space museum|aeronautics and space administration|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(nasa(?: ames research center| astronaut corps|)|national (?:air and space museum|aeronautics and space administration|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(outer space)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(outer space)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(pluto|project (?:gemini|mercury|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(pluto|project (?:gemini|mercury|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(satellite catalog number|saturn|skylab|solid\-fuel rocket|space[ ]*(?:craft|program|science|shuttle|walk(?:s))|space shuttle[ ]*(?:atlantis|challenger|columbia|discovery|endeavor|program|)|space station|spy satellite|star trek)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(satellite catalog number|saturn|skylab|solid\-fuel rocket|space[ ]*(?:craft|program|science|shuttle|walk(?:s))|space shuttle[ ]*(?:atlantis|challenger|columbia|discovery|endeavor|program|)|space station|spy satellite|star trek)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(uranus)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(uranus)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(venus|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(venus|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:johnson|kennedy|) space center)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:johnson|kennedy|) space center)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(sts\-((\d{1,1})|(\d{1,2})|(\d{1,3})))\|([^\]]+?)\]\]", "$6"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(sts\-((\d{1,1})|(\d{1,2})|(\d{1,3})))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(sts\-((\d{1,1})|(\d{1,2})|(\d{1,3})))\|([^\]]+?)\]\]", "$6"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(sts\-((\d{1,1})|(\d{1,2})|(\d{1,3})))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(nasa astronaut group ((\d{1,1})|(\d{1,2})|(\d{1,3})))\|([^\]]+?)\]\]", "$6"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(nasa astronaut group ((\d{1,1})|(\d{1,2})))\]\]", "$1"); // // Aviation ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(aero(?:batic|dynamics|nautical|nautics|space|)|afterburn(?:er|ing|)|aircraft registration|airfoil|airliner|airframe|aileron(?:s|)|air international|aircraft[ ]+(?:cabin|canopy|hijacking|pylon|)|airspeed|american institute of aeronautics and astronautics|amphibious aircraft|area rule|arresting gear|aspect ratio \(wing\)|autopilot|avgas|aviator|aviation (?:fuel|gas)|avionics)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(aero(?:batic|dynamics|nautical|nautics|space|)|afterburn(?:er|ing|)|aircraft registration|airfoil|airliner|airframe|aileron(?:s|)|air international|aircraft[ ]+(?:cabin|canopy|hijacking|pylon|)|airspeed|american institute of aeronautics and astronautics|amphibious aircraft|area rule|arresting gear|aspect ratio \(wing\)|autopilot|avgas|aviator|aviation (?:fuel|gas)|aviation fuel|avionics)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(balanced rudder|biplane|boiler \(steam generator\)|business jet)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(balanced rudder|biplane|boiler \(steam generator\)|business jet)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(cabane strut|cabin pressurization|canard \(aeronautics\)|cantilever wing|coastal trading vessel|cockpit(?: \(aviation\))|codename|controllable pitch propeller|conventional landing gear|cowling)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(cabane strut|cabin pressurization|canard \(aeronautics\)|cantilever wing|coastal trading vessel|cockpit(?: \(aviation\))|codename|controllable pitch propeller|conventional landing gear|cowling)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(deep stall|drag \(physics\)|drop tank)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(deep stall|drag \(physics\)|drop tank)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(eastern air lines|empennage|ejection seat|elevator|experimental aircraft)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(eastern air lines|empennage|ejection seat|elevator|experimental aircraft)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(faa|fin|fixed\-wing aircraft|flight|flight (?:engineer|instructor|international|schooltraining|)|float plane|flyaway cost|fuel tank|fuselage)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(faa|fin|fixed\-wing aircraft|flight|flight (?:engineer|instructor|international|schooltraining|)|float plane|flyaway cost|fuel tank|fuselage)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(g\-numbers|gas\-operated|general aviation|glass cockpit|glider \(sailplane\)|gull wing|gyroscope)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(g\-numbers|gas\-operated|general aviation|glass cockpit|glider \(sailplane\)|gull wing|gyroscope)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(hangar|imo ship identification number|imperial airways|international civil aviation organization|interplane strut|jet aircraft|klm|landing gear|leading edge slats|longeron|maritime pilot|monoplane|(?:screw|)[ ]*propeller[ ]*(?:\#marine|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(hangar|imo ship identification number|imperial airways|international civil aviation organization|interplane strut|jet aircraft|klm|landing gear|leading edge slats|longeron|maritime pilot|monoplane|(?:screw|)[ ]*propeller[ ]*(?:\#marine|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(pan am(?:erican world airways|erican airways|)|paris air show|propeller shaft \(ship\))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(pan am(?:erican world airways|erican airways|)|paris air show|propeller shaft \(ship\))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(radiation|ramjet|research and development|rotorcraft|royal aero club|royal aeronautical society)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(radiation|ramjet|research and development|rotorcraft|royal aero club|royal aeronautical society)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(schneider trophy|service ceiling|society of experimental test pilots|stol|stressed skin|stunt pilot|superheating|swept wing)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(schneider trophy|service ceiling|society of experimental test pilots|stol|stressed skin|stunt pilot|superheating|swept wing)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(tailplane|takeoff|test pilot|tiltrotor|trailing edge|trainer aircraft|training aircraft|transatlantic flight|trans world airlines|turb(?:ine|ofan|ojet|oprop|oshaft|)|twa|twinjet|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(tailplane|takeoff|test pilot|tiltrotor|trailing edge|trainer aircraft|training aircraft|transatlantic flight|trans world airlines|turb(?:ine|ofan|ojet|oprop|oshaft|)|twa|twinjet)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(utility aircraft|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(utility aircraft)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(variable pitch propeller|ventral|vertical stabilizer)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(variable pitch propeller|ventral|vertical stabilizer)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(wind tunnel|wing|wing[ ]+(?:root|span|tip|tip device|tips|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(wind tunnel|wing|wing[ ]+(?:root|span|tip|tip device|tips|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(yaw(?: angle|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(yaw(?: angle|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(general aviation)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(general aviation)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(air[ ]*(?:craft fairing|enthusiast|field|lift|line|line hub|\-sea rescue|traffic control|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(air[ ]*(?:craft fairing|enthusiast|field|lift|line|line hub|\-sea rescue|traffic control|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:airbrake|balloon|cabin|chord|dihedral|elevator|flap|propeller|spinner|) \(aircraft\))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:airbrake|balloon|cabin|chord|dihedral|elevator|flap|propeller|spinner|) \(aircraft\))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:inline engine|skid|spar|stagger|) \(aviation\))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:inline engine|skid|spar|stagger|) \(aviation\))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:pitch|spin|stall|) \(flight\))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:pitch|spin|stall|) \(flight\))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(boeing (?:737|747|767|777|787))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(boeing (?:737|747|767|777|787))\|([^\]]+?)\]\]", "$2"); // // Nautical ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(aft(?:castle|)|airlock|amidships|anchor)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(aft(?:castle|)|airlock|amidships|anchor)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ballast tanks|bareboat charter|barge|barque|barrel|beam \(nautical\)|between perpendiculars|bilge keel|blue riband|boat(?:s|er|ers|ing|dock|launch|)|buoyancy|bow(?:sprit|wave|)|bulkhead \(partition\)|buoy)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ballast tanks|bareboat charter|barge|barque|barrel|beam \(nautical\)|between perpendiculars|bilge keel|blue riband|boat(?:s|er|ers|ing|dock|launch|)|buoyancy|bow(?:sprit|wave|)|bulkhead \(partition\)|buoy)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(canoe|cargo liner|casing \(submarine\)|catamaran|clipper|coastal trading vessel|collier \(ship type\)|commerce raider|commercial trawler|constructive total loss|controllable pitch propeller|convoy(?:s|)|copper sheathing|crush depth)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(canoe|cargo liner|casing \(submarine\)|catamaran|clipper|coastal trading vessel|collier \(ship type\)|commerce raider|commercial trawler|constructive total loss|controllable pitch propeller|convoy(?:s|)|copper sheathing|crush depth)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(davit|deep load|dinghy|dockyard|double bottom|draft \(hull\)|draught \(hull\)|dry[ _]+dock)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(davit|deep load|dinghy|dockyard|double bottom|draft \(hull\)|draught \(hull\)|dry[ _]+dock)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(east indiamen|engine room)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(east indiamen|engine room)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ferry|fishing trawler|fitting(?: out|\-out)|flank speed|float|full\-load displacement|funnel)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ferry|fishing trawler|fitting(?: out|\-out)|flank speed|float|full\-load displacement|funnel)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gasoline tanker|glossary of nautical terms)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gasoline tanker|glossary of nautical terms)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(harbor|head sea|heeling \(sailing\)|helicopters|high speed transport|home(?:port| port)|houseboat|hull \(watercraft\))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(harbor|head sea|heeling \(sailing\)|helicopters|high speed transport|home(?:port| port)|houseboat|hull \(watercraft\))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(in ordinary)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(in ordinary)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(jury\-rig)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(jury\-rig)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(keel(?: laying|)|knot \(speed\))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(keel(?: laying|)|knot \(speed\))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(lateen|lee(?:way| helm)|length(?: at the waterline| between perpendiculars| overall|)|lifeboat \(shipboard\)|life raft|lightvessel|lighter \(barge\)|list \(watercraft\)|list of seaplanes and flying boats)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(lateen|lee(?:way| helm)|length(?: at the waterline| between perpendiculars| overall|)|lifeboat \(shipboard\)|life raft|lightvessel|lighter \(barge\)|list \(watercraft\)|list of seaplanes and flying boats)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(maiden voyage|mainmast|marine (?:propulsion|salvage|)|maritime patrol aircraft|mast \(sailing\)|merchant vessel|metacentric height|motorboat|museum ship)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(maiden voyage|mainmast|marine (?:propulsion|salvage|)|maritime patrol aircraft|mast \(sailing\)|merchant vessel|metacentric height|motorboat|museum ship)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(nautical (?:charts|mile|)|navigat(?:e|ion|or|)|nuclear fission)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(nautical (?:charts|mile|)|navigat(?:e|ion|or|)|nuclear fission)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ocean liner|oil tanker(?:s))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ocean liner|oil tanker(?:s))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(paddle(?: steamer|)|planing \(sailing\)|plymouth dockyard|pontoon bridge|poop deck|port (?:and starboard|\(nautical\)|\(direction\))|pressure hull|propeller(?: \(marine\))|purser)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(paddle(?: steamer|)|planing \(sailing\)|plymouth dockyard|pontoon bridge|poop deck|port (?:and starboard|\(nautical\)|\(direction\))|pressure hull|propeller(?: \(marine\))|purser)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(quarterdeck)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(quarterdeck)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(razee|refueling overhaul|regatta|research vessel|revenue cutter|rigging|rms titanic|rolls-royce merlin|royal yacht)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(razee|refueling overhaul|regatta|research vessel|revenue cutter|rigging|rms titanic|rolls-royce merlin|royal yacht)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(sail(?:s|)|sail \(submarine\)|sailing (?:ballast|ship|)|sampan|sandbar(?:s)|schooner(?:s)|scuttled|sea (?:captain|port)|sea trial(?:s|)|seawater|shaft horsepower|shakedown cruise|shakedown \(testing\)|ship\'s wheel|shipwreck|ship and submarine recycling program|shoal(?:s)|slipway|sponson|starboard|steam catapult|stern(?:post|)|studding sail|superstructure|survey vessel)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(sail(?:s|)|sail \(submarine\)|sailing (?:ballast|ship|)|sampan|sandbar(?:s)|schooner(?:s)|scuttled|sea (?:captain|port)|sea trial(?:s|)|seawater|shaft horsepower|shakedown cruise|shakedown \(testing\)|ship\'s wheel|shipwreck|ship and submarine recycling program|shoal(?:s)|slipway|sponson|starboard|steam catapult|stern(?:post|)|studding sail|superstructure|survey vessel)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ship[ ]*(?:\'s badge|breaking|building|commissioning|decommissioning|cradle|floodability|grounding|naming and launching|rig|sponsor|wreck(?:s)|yard|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ship[ ]*(?:\'s badge|breaking|building|commissioning|decommissioning|cradle|floodability|grounding|naming and launching|rig|sponsor|wreck(?:s)|yard|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(tacking \(sailing\)|tide|transatlantic|top(?:mast|sail|)|transom stern|transport|tug|tumblehome)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(tacking \(sailing\)|tide|transatlantic|top(?:mast|sail|)|transom stern|transport|tug|tumblehome)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(underwater diving|underway|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(underwater diving|underway|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(water(?: landning|line|line length|tight compartment|\-tube boiler|)|tug[ ]*(?:boat|)|wave\-piercing|weather helm|well deck|whaleboat|wrought iron)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(water(?: landning|line|line length|tight compartment|\-tube boiler|)|tug[ ]*(?:boat|)|wave\-piercing|weather helm|well deck|whaleboat|wrought iron)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(yacht(?:s|ing|)|yawl|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(yacht(?:s|ing|)|yawl|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:cutter|hydroplane|launch|pontoon|) \(boat\))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:cutter|hydroplane|launch|pontoon|) \(boat\))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:container|cruise|depot|long|merchant|packet|passenger|prison|receiving|reefer|school|sister|steam|stores|survey|tank|training|transport|whaling|)[ ]*boat)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:container|cruise|depot|long|merchant|packet|passenger|prison|receiving|reefer|school|sister|steam|stores|survey|tank|training|transport|whaling|)[ ]*boat)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:container|cruise|depot|merchant|packet|passenger|prison|receiving|reefer|royal mail|school|sister|steam|store|survey|tank|transport|weather|whaling|)[ ]*ship)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:container|cruise|depot|merchant|packet|passenger|prison|receiving|reefer|royal mail|school|sister|steam|store|survey|tank|transport|weather|whaling|)[ ]*ship)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:beam|boiler room|bow|bridge|camber|charter|collier|commission|deck|displace|displacement|draft|draught|flare|funnel|hulk|hull|junk|launch|launched|maritime commission|pinnacle|propeller shaft|sheer|stabilizer|steering wheel|tanker|transport|) \(ship\))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:beam|boiler room|bow|bridge|camber|charter|collier|commission|deck|displace|displacement|draft|draught|flare|funnel|hulk|hull|junk|launch|launched|maritime commission|pinnacle|propeller shaft|sheer|stabilizer|steering wheel|tanker|transport|) \(ship\))\|([^\]]+?)\]\]", "$2"); // // earth science ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(algebra|altitude|alumin(?:a|i?um)|animal(?:s)|apple|archaeolog(?:er|ical|y|ist|)|arithmetic|astrolog(?:y|er|ist|ical|)|astronom(?:y|er|ical|)|automobile(?:s))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(algebra|altitude|alumin(?:a|i?um)|animal(?:s)|apple|archaeolog(?:er|ical|y|ist|)|arithmetic|astrolog(?:y|er|ist|ical|)|astronom(?:y|er|ical|)|automobile(?:s))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(banana|beach(?:s)|beef|beverage|bicycle|biolog(?:y|er|ist|ical|)|biscuit|boat|bone|botan(?:y|ist|ical|)|breadfruit|breakfast)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(banana|beach(?:s)|beef|beverage|bicycle|biolog(?:y|er|ist|ical|)|biscuit|boat|bone|botan(?:y|ist|ical|)|breadfruit|breakfast)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(car|carrot|cave(?:s)|charcoal|chocolate|chrom(?:ium|e)|citrus|climate change|coal(?: gas)|coconut(?: oil|)|coffee|copper|copra|cypress)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(car|carrot|cave(?:s)|charcoal|chocolate|chrom(?:ium|e)|citrus|climate change|coal(?: gas)|coconut(?: oil|)|coffee|copper|copra|cypress|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(dairy(?: produce)|dessert|diamond|dinner)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(dairy(?: produce)|dessert|diamond|dinner)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(earthquake|ecolog(?:y|ist|ical|)|elevation|energy|engine(?:s)|equipment|estuary|explor(?:ed|er|ing|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(earthquake|ecolog(?:y|ist|ical|)|elevation|energy|engine(?:s)|equipment|estuary|explor(?:ed|er|ing|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(famine|ferry|fertilization|fish|food|forest(?:s)|fruit|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(famine|ferry|fertilization|fish|food|forest(?:s)|fruit|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gale|gases|geolog(?:y|ist|)|geologic(?:|al|)|geograph(?:y|er|ical|)|geometr(?:y|ical|)|gold(?: coin| rush|)|graphite|gypsum)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gale|gases|geolog(?:y|ist|)|geologic(?:|al|)|geograph(?:y|er|ical|)|geometr(?:y|ical|)|gold(?: coin| rush|)|graphite|gypsum)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(hill(?:s)|hydrogen)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(hill(?:s)|hydrogen)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(insect(?:s)|instrument|iron(?: ore|)|island(?:s))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(insect(?:s)|instrument|iron(?: ore|)|island(?:s))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(juice)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(juice)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(lagoon(?:s)|lake(?:s)|land(?:s)|latitude|lead|lemon|letter|liquid(?: oxygen)|limestone|livestock|logging|lunch|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(lagoon(?:s)|lake(?:s)|land(?:s)|latitude|lead|lemon|letter|liquid(?: oxygen)|limestone|livestock|logging|lunch|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(machine(?:s)|magnesium|mahogany|marble|materials science|meat|melon|mercury \(element\)|metal|milk|min(?:ing|e|eral|eral sands)|motor(?:cycle)|mountain(?:s|eering| climber| range|)|meteorolog(?:y|ist|ic|ical|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(machine(?:s)|magnesium|mahogany|marble|materials science|meat|melon|mercury \(element\)|metal|milk|min(?:ing|e|eral|eral sands)|motor(?:cycle)|mountain(?:s|eering| climber| range|)|meteorolog(?:y|ist|ic|ical|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(name|natural gas|nickel|nitrogen|number(?:s))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(name|natural gas|nickel|nitrogen|number(?:s))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(oak(?: tree)|obsidian|ocean(?:s)|oceanograph(?:y|er|ic|ical|)|onion)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(oak(?: tree)|obsidian|ocean(?:s)|oceanograph(?:y|er|ic|ical|)|onion)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(oil(?:field| field| painting|\-pipeline| pipeline| refinery|shale| shale|spill| spill| tanker|well| well|\-wrestling))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(oil(?:field| field| painting|\-pipeline| pipeline| refinery|shale| shale|spill| spill| tanker|well| well|\-wrestling))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:castor|crude|fuel) oil)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:castor|crude|fuel) oil)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(pear|plant(?:s)|polo pony|pond(?:s)|pork|potatoe?|poultry|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(pear|plant(?:s)|polo pony|pond(?:s)|pork|potatoe?|poultry|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(quartz)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(quartz)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(radium|river(?:s))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(radium|river(?:s))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(sandstone|sea(?: level|s)|sentence|ship|shoal|silt|silver|solid|spice(?:s|y|)|stream(?:s)|sulfur|sulphur|supper|surveying)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(sandstone|sea(?: level|s)|sentence|ship|shoal|silt|silver|solid|spice(?:s|y|)|stream(?:s)|sulfur|sulphur|supper|surveying)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(tea|timber|tomatoe?|tool(?:s)|topography|tree(?:s)|trigonometry|tropical|truck|tyre)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(tea|timber|tomatoe?|tool(?:s)|topography|tree(?:s)|trigonometry|tropical|truck|tyre)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(van|vegetables?)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(van|vegetables?)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(wheel(?:s)|word(?:s)|wrought\-iron)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(wheel(?:s)|word(?:s)|wrought\-iron)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(xenon)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(xenon)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(zoolog(?:y|ist|ical|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(zoolog(?:y|ist|ical|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:hu|wo|)m[ae]n)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(blog|(?:e-?|)mail|computer|personal\scomputer|PC|laptop|laptop\scomputer|(?:cell|cellular|mobile|portable|tele) ?phone|MP3(?: player|)|SMS|digital audio player|(?:computer |)(?:application|hardware|program|software)|(?:computer |video |)game)(s|)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(computer|high|information)( technology|)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(english|herb|rock|vegetable|information)( garden|)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[([hw]eight)\]\]", "$1"); // // animals, hunting, fishing and shooting ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(african elephant|american (?:bison|black bear)|amphibian(?:s|)|animal(?:s|)|antelope|ape|baboon|badger|bald eagle|bear|beaver(?:s|)|bird(?:s|)|bison|bridle|brown bear|black bear|bobcat|grizzly bear|polar bear|boar|bull|camel|cape buffalo|carnivore|cat|cattle|cheetah|cicken|coyote|cougar|cow|coypu|crocodile|crow|dog|dolphin|dove|duck|donkey|eagle|eland \(genus\)|elephant|elk|emu|falcon|fish(?:|es|ed|ermen|ing|)|frog(?:s|)|giraffe|goat|gopher|ground(?:hog| squirrel|)|hare|herbivore|hippopotamus|horse(?:s|)|house sparrow|hyena|invert[aei]brate|jaguar|lemur|leopard|lion|mallard duck|mamm(?:al|oth|)|marmot|mollusk|monkey|moose|mussel|muzzle\-loading|opossum|oxen|partridge|pet|pig(?:eon|)|primate|porcupine|prairie dog|prairiedog|predator|pronghorn|raccoon|rabbit|(?:jack)rabbit|rat|rattlesnake|reptile|rhinoceros|salmon|saami|scorpion|seagull|shark|sheep|shooting sports|skunk|snake|spider|squirrel|stag|starling|stock \(firearm\)|swan|tiger|tilia|trout|tsetse|varmint|vermin|walrus|water buffalo|weasel|whal(?:e|ing|er|)|wildebeest|wild beast|wild boar|wolf|wood(?:chuck| chuck|)|woolly rhinoceros|zebra|zoology)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(african elephant|american (?:bison|black bear)|amphibian(?:s|)|animal(?:s|)|antelope|ape|baboon|badger|bald eagle|bear|beaver(?:s|)|bird(?:s|)|bison|bridle|brown bear|black bear|bobcat|grizzly bear|polar bear|boar|bull|camel|cape buffalo|carnivore|cat|cattle|cheetah|cicken|coyote|cougar|cow|coypu|crocodile|crow|dog|dolphin|dove|duck|donkey|eagle|eland \(genus\)|elephant|elk|emu|falcon|fish(?:|es|ed|ermen|ing|)|frog(?:s|)|giraffe|goat|gopher|ground(?:hog| squirrel|)|hare|herbivore|hippopotamus|horse(?:s|)|house sparrow|hyena|invert[aei]brate|jaguar|lemur|leopard|lion|mallard duck|mamm(?:al|oth|)|marmot|mollusk|monkey|moose|mussel|muzzle\-loading|opossum|oxen|partridge|pet|pig(?:eon|)|primate|porcupine|prairie dog|prairiedog|predator|pronghorn|raccoon|rabbit|(?:jack)rabbit|rat|rattlesnake|reptile|rhinoceros|salmon|saami|scorpion|seagull|shark|sheep|shooting sports|skunk|snake|spider|squirrel|stag|starling|stock \(firearm\)|swan|tiger|tilia|trout|tsetse|varmint|vermin|walrus|water buffalo|weasel|whal(?:e|ing|er|)|wildebeest|wild beast|wild boar|wolf|wood(?:chuck| chuck|)|woolly rhinoceros|zebra|zoology)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(air gun|antler|big five game|big game|cattle raid(?:|s|ed|er|ers|ing|)|cruelty to animal(?:s|)|domestic animal|feral|field target|fish(?:|es|ed|er|ermen|ing|)|ivory|game|game animal|hunt(?:|s|ed|er|ers|ing|)|plains game|purebred|shoot(?:|s|ed|er|ers|ing|)|small game|target shooting|trapp(?:|s|ed|er|ers|ing|)|tusk|wax)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(air gun|antler|big five game|big game|cattle raid(?:|s|ed|er|ers|ing|)|cruelty to animal(?:s|)|domestic animal|feral|field target|fish(?:|es|ed|er|ermen|ing|)|ivory|game|game animal|hunt(?:|s|ed|er|ers|ing|)|plains game|purebred|shoot(?:|s|ed|er|ers|ing|)|small game|target shooting|trapp(?:|s|ed|er|ers|ing|)|tusk|wax)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:big game|deer|fox|seal|trophy|varmint|) hunting)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:big game|deer|fox|seal|trophy|varmint|) hunting)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:mule|red|white\-tailed|white tailed) deer)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:mule|red|white\-tailed|white tailed) deer)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:hunting|racing|working|) dog)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:hunting|racing|working|) dog)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:hunt\||)(hunt(?:|s|ed|er|ers|ing|))(license(?:s|)|season(?:s|)|law(?:s|))\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:fish\||)(fish(?:|es|ed|er|ermen|ing|))(license(?:s|)|season(?:s|)|law(?:s|))\]\]", "$1$2"); // // geo-politics ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(abdication|abolished monarchy|absolute monarchy|acclamation|act of congress|al (anbar governorate|jazeera english)|ambassador|ambassadors of the united states|american (?:english|politician|)|amnesty(?: international|)|anglophobia|anti\-(?:american|confederation party)|apartheid|appeal|archbishop of canterbury|archduchy of austria|aristocracy|aristocracy \(class\)|armenian kingdom of cilicia|articles of confederation|assassinat(?:e|ed|ion|)|attaché|austerity|australian (?:labor party|partition)|autocracy)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(abdication|abolished monarchy|absolute monarchy|acclamation|act of congress|al (anbar governorate|jazeera english)|ambassador|ambassadors of the united states|american (?:english|politician|)|amnesty(?: international|)|anglophobia|anti\-(?:american|confederation party)|apartheid|appeal|archbishop of canterbury|archduchy of austria|aristocracy|aristocracy \(class\)|armenian kingdom of cilicia|articles of confederation|assassinat(?:e|ed|ion|)|attaché|austerity|australian (?:labor party|partition)|autocracy)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ba\'ath party|baath party|bribe(?:ry|)|boy scouts(?: of america)|brookings institution)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ba\'ath party|baath party|bribe(?:ry|)|boy scouts(?: of america)|brookings institution)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(buckingham palace|bureaucracy|bureau of alcohol\, tobacco\, firearms and explosives|bureau of indian affairs)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(buckingham palace|bureaucracy|bureau of alcohol\, tobacco\, firearms and explosives|bureau of indian affairs)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(british (?:columbia|commonwealth|crown|government|house of commons|imperialism|india|malaya|mandate for palestine|mandate of palestine|museum|prime minister|raj|royal family|whig party|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(british (?:columbia|commonwealth|crown|government|house of commons|imperialism|india|malaya|mandate for palestine|mandate of palestine|museum|prime minister|raj|royal family|whig party|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(cabinet of (?:the united kingdom|canada)|canadian (?:cabinet|confederation|house of commons|senate|)|capitol hill|carpetbagger|caucus|census|central (?:african republic|committee|)|ceremony|chamberlain \(office\)|chancellor|chancellor \(china\)|chancellor of (?:germany|the exchequer|tang dynasty|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(cabinet of (?:the united kingdom|canada)|canadian (?:cabinet|confederation|house of commons|senate|)|capitol hill|carpetbagger|caucus|census|central (?:african republic|committee|)|ceremony|chamberlain \(office\)|chancellor|chancellor \(china\)|chancellor of (?:germany|the exchequer|tang dynasty|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(chinese (?:communists|communist party|people\'s political consultative conference|style name|)|citizenship|city\-state|city council|civilian conservation corps|civilization|cognomen|colonial office|comintern|commandery \(china\)|commissar|committee|committee of public safety|committee of safety \(american revolution\)|commonwealth|commonwealth of (?:australia|independent states|)|communist romania|communist party|communist party of (?:germany|the soviet union|yugoslavia|)|congress of the (?:confederate states|united states)|congressional (?:gold medal|research service)|consensus|conservative party /(uk/)|conspiracy theory|constitution|constitutional convention \(political meeting\)|constitutional monarchy|consul \(representative\)|continent(?:al|)|continental congress|coronation|corps of royal engineers|corruption|council (?:of europe|on foreign relations|)|crown (?:of aragon|of castile|prince|)|cultural revolution|customs|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(chinese (?:communists|communist party|people\'s political consultative conference|style name|)|citizenship|city\-state|city council|civilian conservation corps|civilization|cognomen|colonial office|comintern|commandery \(china\)|commissar|committee|committee of public safety|committee of safety \(american revolution\)|commonwealth|commonwealth of (?:australia|independent states|)|communist romania|communist party|communist party of (?:germany|the soviet union|yugoslavia|)|congress of the (?:confederate states|united states)|congressional (?:gold medal|research service)|consensus|conservative party /(uk/)|conspiracy theory|constitution|constitutional convention \(political meeting\)|constitutional monarchy|consul \(representative\)|continent(?:al|)|continental congress|coronation|corps of royal engineers|corruption|council (?:of europe|on foreign relations|)|crown (?:of aragon|of castile|prince|)|cultural revolution|customs|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(daimyō|dauphin of france|declaration of independence|defection|delegation|democracy|democratic national committee|democracy now\!|democratic\-republican party|department of (?:health and human services|homeland security|state|)|despotate of epirus|dictator(?:ship|)|diploma(?:t|cy|)|diplomatic mission|director\-general|dissolution of the soviet union|dominion|double agent|duchy of (?:brabant|burgundy|luxembourg|luxemburg|milan|savoy|Württemberg|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(daimyō|dauphin of france|declaration of independence|defection|delegation|democracy|democratic national committee|democracy now\!|democratic\-republican party|department of (?:health and human services|homeland security|state|)|despotate of epirus|dictator(?:ship|)|diploma(?:t|cy|)|diplomatic mission|director\-general|dissolution of the soviet union|dominion|double agent|duchy of (?:brabant|burgundy|luxembourg|luxemburg|milan|savoy|Württemberg|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(electorate of (?:hanover|saxony|)|emancipation proclamation|Émigré|emperor|emperor of (?:china|ethiopia|)|empress|empress dowager|empire|empire of (?:brazil|ethiopia|trebizond|)|english heritage|eniwetok atoll|english (?:commonwealth|heritage|parliament)|enlightenment spain|espionage|estates general \(france\)|eunuch|european court of human rights|european parliament|european and american voyages of scientific exploration|excommunication|executive \(government\)|executive order \(united states\)|executive office of the president of the united states|exile|extradition|extrajudicial detention|extraordinary rendition|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(electorate of (?:hanover|saxony|)|emancipation proclamation|Émigré|emperor|emperor of (?:china|ethiopia|)|empress|empress dowager|empire|empire of (?:brazil|ethiopia|trebizond|)|english heritage|eniwetok atoll|english (?:commonwealth|heritage|parliament)|enlightenment spain|espionage|estates general \(france\)|eunuch|european court of human rights|european parliament|european and american voyages of scientific exploration|excommunication|executive \(government\)|executive order \(united states\)|executive office of the president of the united states|exile|extradition|extrajudicial detention|extraordinary rendition|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(elections in (?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(elections in (?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming||))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(eshkol regional council|executive agency)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(eshkol regional council|executive agency)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(far right|fatah|federales \(argentina\)|federalist party|federation|federation of (?:australia|malaya|)|fellow of the royal society|feudal|fiat|fiefdom|first (?:austrian republic|bulgarian empire|continental congress|french (?:nobility|republic)|lady of the united states|nations|philippine republic|)|flag(?: of the united states|)|floruit|foreign (?:affairs|affairs select committee|and commonwealth office|policy|relations of the united states|service officer|)|freedom of (?:information act|the city|the press|)|freemason(?:s|ry|)|freiherr|french (?:communist party|consulate|directory|ministry of culture|parliament|senate|)|french (?:first|second|third|fourth|fifth) republic|frontier|führer|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(far right|fatah|federales \(argentina\)|federalist party|federation|federation of (?:australia|malaya|)|fellow of the royal society|feudal|fiat|fiefdom|first (?:austrian republic|bulgarian empire|continental congress|french (?:nobility|republic)|lady of the united states|nations|philippine republic|)|flag(?: of the united states|)|floruit|foreign (?:affairs|affairs select committee|and commonwealth office|policy|relations of the united states|service officer|)|freedom of (?:information act|the city|the press|)|freemason(?:s|ry|)|freiherr|french (?:communist party|consulate|directory|ministry of culture|parliament|senate|)|french (?:first|second|third|fourth|fifth) republic|frontier|führer|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(federal (?:aviation administration|bureau of investigation|election commission|emergency management agency|government of the united states|law|republic of germany|security service \(russia\)))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(federal (?:aviation administration|bureau of investigation|election commission|emergency management agency|government of the united states|law|republic of germany|security service \(russia\)))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gaullist party|general (?:election|national congress|secretary|strike|)|genocide|gens|german confederation|glasnost|goryeo|govern(?:or|ment)|government (?:accountability office|printing office|)|governor(?:\-general| general|\-general of australia|\-general of india| general of canada| of gibraltar|\-general of the philippines|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gaullist party|general (?:election|national congress|secretary|strike|)|genocide|gens|german confederation|glasnost|goryeo|govern(?:or|ment)|government (?:accountability office|printing office|)|governor(?:\-general| general|\-general of australia|\-general of india| general of canada| of gibraltar|\-general of the philippines|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(government of (?:australia|canada|france|gibraltar|india|pakistan|the netherlands|the united kingdom|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(government of (?:australia|canada|france|gibraltar|india|pakistan|the netherlands|the united kingdom|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(governor of (?:alaska|american somoa|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|gibraltar|guam|hawaii|idaho|illinois|indiana|iowa|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new hampshire|new jersey|new mexico|new south wales|new york|north carolina|north dakota|ohio|oklahoma|oregon|pennsylvania|puerto rico|rhode island|south carolina|south dakota|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(governor of (?:alaska|american somoa|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|gibraltar|guam|hawaii|idaho|illinois|indiana|iowa|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new hampshire|new jersey|new mexico|new south wales|new york|north carolina|north dakota|ohio|oklahoma|oregon|pennsylvania|puerto rico|rhode island|south carolina|south dakota|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(graf|grand duchy of (?:baden|lithuania|tuscany|)|grand (?:embassy|national assembly of turkey|vizier|)|great purge|gubernatorial)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(graf|grand duchy of (?:baden|lithuania|tuscany|)|grand (?:embassy|national assembly of turkey|vizier|)|great purge|gubernatorial)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(habsburg monarchy|halifax \(electoral district\)|han chinese|hansard|hanseatic league|head of (?:government|state|)|heir presumptive|her majesty\'s (?:government|most honourable privy council|)|heraldry|hero|high (?:commissioner|treason|)|hirohito and the making of modern japan|historical reenactment|history of (?:korea|seychelles|the five dynasties|)|hmso|holy land|home secretary|house of (?:bourbon|commons of england|commons of the united kingdom|habsburg|lords|savoy|stuart|york|)|human rights|humanitarian aid|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(habsburg monarchy|halifax \(electoral district\)|han chinese|hansard|hanseatic league|head of (?:government|state|)|heir presumptive|her majesty\'s (?:government|most honourable privy council|)|heraldry|hero|high (?:commissioner|treason|)|hirohito and the making of modern japan|historical reenactment|history of (?:korea|seychelles|the five dynasties|)|hmso|holy land|home secretary|house of (?:bourbon|commons of england|commons of the united kingdom|habsburg|lords|savoy|stuart|york|)|human rights|humanitarian aid|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(imperial(?: state crown)|inauguration day|incumbent|independance|indian national congress|industrial revolution|industrialization|intelligentsia|intelligence agenc(?:ies|y|)|intelligence \(information gathering\)|international[ ]+(?:committtee of the red cross|court of justice|crisis group|law|red cross and red crescent movement|)|iowa caucus|iraqi police|italian fascism|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(imperial(?: state crown)|inauguration day|incumbent|independance|indian national congress|industrial revolution|industrialization|intelligentsia|intelligence agenc(?:ies|y|)|intelligence \(information gathering\)|international[ ]+(?:committtee of the red cross|court of justice|crisis group|law|red cross and red crescent movement|)|iowa caucus|iraqi police|italian fascism|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(japanese empire|july monarchy|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(japanese empire|july monarchy|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(kaiser|katipunan|khagan|king(?:dom|)|knesset|komsomol|ku klux klan|kurdistan workers\' party|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(kaiser|katipunan|khagan|king(?:dom|)|knesset|komsomol|ku klux klan|kurdistan workers\' party|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(king of (?:poland|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(king of (?:poland|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(kingdom of (?:aragon|bavaria|bohemia|castile|egypt|georgia|greece|hanover|hawaii|holland|hungary|iraq|italy \(1861\–1946\)|laos|león|montenegro|mysore|navarre|naples|poland \(1385\–1569\)|prussia|romania|sardinia|saudia arabia|saxony|scotland|serbia|serbs\, croats and slovenes|sicily|the netherlands|the two sicilies|württemberg|yugoslavia|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(kingdom of (?:aragon|bavaria|bohemia|castile|egypt|georgia|greece|hanover|hawaii|holland|hungary|iraq|italy \(1861\–1946\)|laos|león|montenegro|mysore|navarre|naples|poland \(1385\–1569\)|prussia|romania|sardinia|saudia arabia|saxony|scotland|serbia|serbs\, croats and slovenes|sicily|the netherlands|the two sicilies|württemberg|yugoslavia|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(laird|league of nations|left\-wing|left\-wing politics|legislat(?:or|ure|)|legitimacy \(political\)|legislative assembly of ontario|legislative council|liberal|liberal party of (?:australia|canada|)|library of congress country studies|lieutenant governor|list of (?:freemasons|korea\-related topics|roman republican consuls|states with limited recognition|)|lobbying|logistics|long parliament|lord (?:chancellor|lieutenant|lieutenant of ireland|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(laird|league of nations|left\-wing|left\-wing politics|legislat(?:or|ure|)|legitimacy \(political\)|legislative assembly of ontario|legislative council|liberal|liberal party of (?:australia|canada|)|library of congress country studies|lieutenant governor|list of (?:freemasons|korea\-related topics|roman republican consuls|states with limited recognition|)|lobbying|logistics|long parliament|lord (?:chancellor|lieutenant|lieutenant of ireland|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(magna carta|maratha empire|maritime (?:administration|commission|)|martyr|meiji government|member of parliament[ ]+\(united kingdom\)|(?:prime |)minister|member of parliament|member of provincial parliament \(ontario\)|merchant marine|metropolitan france|minister of (?:foreign affairs \(france\)|state)|ministry \(government department\)|ministry of (?:internal affairs \(russia\)|interior)|monarch(?:y|)|monarchy of (?:canada|the united kingdom|)|mongolian people\'s republic|monroe doctrine|MP|mughal emperor|mvd)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(magna carta|maratha empire|maritime (?:administration|commission|)|martyr|meiji government|member of parliament[ ]+\(united kingdom\)|(?:prime |)minister|member of parliament|member of provincial parliament \(ontario\)|merchant marine|metropolitan france|minister of (?:foreign affairs \(france\)|state)|ministry \(government department\)|ministry of (?:internal affairs \(russia\)|interior)|monarch(?:y|)|monarchy of (?:canada|the united kingdom|)|mongolian people\'s republic|monroe doctrine|MP|mughal emperor|mvd)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(national (?:association for the advancement of colored people|cemetery administration|convention|front for the liberation of south vietnam|historic sites of canada|register of historic places|park service|security advisor \(united states\)|security agency|security archive|transitional council|transportation safety board|trust for places of historic interest or natural beauty|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(national (?:association for the advancement of colored people|cemetery administration|convention|front for the liberation of south vietnam|historic sites of canada|register of historic places|park service|security advisor \(united states\)|security agency|security archive|transitional council|transportation safety board|trust for places of historic interest or natural beauty|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(naacp|nationalization|naturalized(?: citizen|)|nazi propaganda|neutral country|new (?:deal|hampshire primary|history of the five dynasties|year honours|years honours|)|nob(?:le|ility|)|nonconformist|north atlantic treaty organisation|novgorod republic|nuclear (?:non\-proliferation treaty|power in pakistan|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(naacp|nationalization|naturalized(?: citizen|)|nazi propaganda|neutral country|new (?:deal|hampshire primary|history of the five dynasties|year honours|years honours|)|nob(?:le|ility|)|nonconformist|north atlantic treaty organisation|novgorod republic|nuclear (?:non\-proliferation treaty|power in pakistan|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(oligarchy|old style|opinion pole|oppression|order of (?:canada|saint stanislaus|st\. stanislaus|the thistle|)|organization of american states|ottoman porte)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(oligarchy|old style|opinion pole|oppression|order of (?:canada|saint stanislaus|st\. stanislaus|the thistle|)|organization of american states|ottoman porte)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(palestinian national authority|pan africanist congress of azania|papal (?:bull|state)|parliament of[ ]+(?:england|great britain|scotland|the united kingdom|)|parliamentary under\-secretary of state|parma|parthian empire|patriation|patrician \(ancient rome\)|peace(?:keeping|keeper)|peer|peerage|peerage of france|peninsula|perestroika|petroleum|people|peshwa|pharaoh|place name|plenipotentiary|polish\–lithuanian commonwealth|polish socialist party|politburo|politic(?:s|al|ian|)|political (?:party|repression|science|machine|prisoner|power|)|polish(?:\-lithuanian commonwealth| government in exile|)|political minister|population(?: density|)|politic(?:s|ian|al)|political (?:freedom|history|rights)|popular sovereignty|post\-nominal letters|postage stamps and postal history of the confederate states|postmaster)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(palestinian national authority|pan africanist congress of azania|papal (?:bull|state)|parliament of[ ]+(?:england|great britain|scotland|the united kingdom|)|parliamentary under\-secretary of state|parma|parthian empire|patriation|patrician \(ancient rome\)|peace(?:keeping|keeper)|peer|peerage|peerage of france|peninsula|perestroika|petroleum|people|peshwa|pharaoh|place name|plenipotentiary|polish\–lithuanian commonwealth|polish socialist party|politburo|politic(?:s|al|ian|)|political (?:party|repression|science|machine|prisoner|power|)|polish(?:\-lithuanian commonwealth| government in exile|)|political minister|population(?: density|)|politic(?:s|ian|al)|political (?:freedom|history|rights)|popular sovereignty|post\-nominal letters|postage stamps and postal history of the confederate states|postmaster)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(president of (?:france|iraq|mexico|poland|russia|the philippines|)|presidency of george w\. bush|presidential elector|presidium of the supreme soviet|primary election|prime minister of (?:australia|canada|france|india|iraq|israel|italy|japan|pakistan|the united kingdom|)|prince(?:\-elector|ess| of wales|)|private secretary|privy council(?: of the united kingdom|)|proconsul|progressive party \(united states\, 1912\)|project gutenburg|public (?:relations|safety|works administration))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(president of (?:france|iraq|mexico|poland|russia|the philippines|)|presidency of george w\. bush|presidential elector|presidium of the supreme soviet|primary election|prime minister of (?:australia|canada|france|india|iraq|israel|italy|japan|pakistan|the united kingdom|)|prince(?:\-elector|ess| of wales|)|private secretary|privy council(?: of the united kingdom|)|proconsul|progressive party \(united states\, 1912\)|project gutenburg|public (?:relations|safety|works administration))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(politics of (?:alabama|alaska|arizona|arkansas|california|canada|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|the united states|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(politics of (?:alabama|alaska|arizona|arkansas|california|canada|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|the united states|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming||))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(qing|quaestor|queen(?: consort|)|queen\'s privy council for canada|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(qing|quaestor|queen(?: consort|)|queen\'s privy council for canada|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(racial segregation|radical republican|radio free europe|reapportionment|reconstruction era of the united states|referendum|reform party of canada|repatriation|republic|republican national committee|republican party \(united states\)|revolution|right\-wing|roman (?:consul|dictator|emperor|numerals|)|romance of the three kingdoms|royal (?:commission|commission on the ancient and historical monuments of scotland|geographical society|society|ulster constabulary|)|runoff election|russian (?:academy of sciences|provisional government|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(racial segregation|radical republican|radio free europe|reapportionment|reconstruction era of the united states|referendum|reform party of canada|repatriation|republic|republican national committee|republican party \(united states\)|revolution|right\-wing|roman (?:consul|dictator|emperor|numerals|)|romance of the three kingdoms|royal (?:commission|commission on the ancient and historical monuments of scotland|geographical society|society|ulster constabulary|)|runoff election|russian (?:academy of sciences|provisional government|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(santa fe trail|satsuma domain|scalawag|schleswig|scottish (?:clan|green party|national party|politics|socialist party|)|seato|second continental congress|secretary of (?:agriculture|commerce|education|energy|the treasury)|secretary\-general of the united nations|secretary of state for (?:foreign and commonwealth affairs|the colonies|)|secular|security council|seleucid empire|senate (?:majority leader|minority leader|)|serf(?:dom)|sheikh|shugo|sikh empire|sino\-soviet split|slavery in the united states|smithsonian institution|social (?:democrats|democracy|security \(united states\))|socialist party \(france\)|socialist unity party of germany|sos|sovereignty|sovereign state|speaker of the united states house of representatives|special election|sphere of influence|stamp act|stamp act congress|state (?:department|governments of the united states|legislature \(united states\)|of emergency|\(polity\)|visit)|states\-general of the netherlands|stockholm international peace research institute|strike action|sublime porte|suffrage|supreme court(?: of the united states|)|surveillance|swastika|swing state|szlachta|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(santa fe trail|satsuma domain|scalawag|schleswig|scottish (?:clan|green party|national party|politics|socialist party|)|seato|second continental congress|secretary of (?:agriculture|commerce|education|energy|the treasury)|secretary\-general of the united nations|secretary of state for (?:foreign and commonwealth affairs|the colonies|)|secular|security council|seleucid empire|senate (?:majority leader|minority leader|)|serf(?:dom)|sheikh|shugo|sikh empire|sino\-soviet split|slavery in the united states|smithsonian institution|social (?:democrats|democracy|security \(united states\))|socialist party \(france\)|socialist unity party of germany|sos|sovereignty|sovereign state|speaker of the united states house of representatives|special election|sphere of influence|stamp act|stamp act congress|state (?:department|governments of the united states|legislature \(united states\)|of emergency|\(polity\)|visit)|states\-general of the netherlands|stockholm international peace research institute|strike action|sublime porte|suffrage|supreme court(?: of the united states|)|surveillance|swastika|swing state|szlachta|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(teutonic order|the (?:clash of civilizations|honourable|jamestown foundation|right honourable|white house|)|three excellencies|town|trade union|transitional federal government|treasurer|truce|tsar|tsardom of russia|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(teutonic order|the (?:clash of civilizations|honourable|jamestown foundation|right honourable|white house|)|three excellencies|town|trade union|transitional federal government|treasurer|truce|tsar|tsardom of russia|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ukrainian (?:people\'s republic|soviet socialist republic|)|umayyad caliphate|un(?: security council| secretary\-general|)|under secretary of state|unhcr|unilateral|union flag|union of soviet socialist republics|unitary executive theory)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ukrainian (?:people\'s republic|soviet socialist republic|)|umayyad caliphate|un(?: security council| secretary\-general|)|under secretary of state|unhcr|unilateral|union flag|union of soviet socialist republics|unitary executive theory)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united nations|united nations[ ]+(?:charter|general assembly|high commissioner for refugees|secretary\-general|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united nations|united nations[ ]+(?:charter|general assembly|high commissioner for refugees|secretary\-general|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united states (?:agency for international development|cabinet|capitol|capital rotunda|census|census bureau|code|congress|congressman|constitution|declaration of independence|democratic party|electoral college|federal judge|foreign service|government|government printing office|house of representatives|lighthouse service|maritime administration|maritime service|marshals service|postal service|republican(?: party|)|representative|secret service|senat(?:e|or|)|senate committee on foreign relations|shipping board|supreme court|whig party|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united states (?:agency for international development|cabinet|capitol|capital rotunda|census|census bureau|code|congress|congressman|constitution|declaration of independence|democratic party|electoral college|federal judge|foreign service|government|government printing office|house of representatives|lighthouse service|maritime administration|maritime service|marshals service|postal service|republican(?: party|)|representative|secret service|senat(?:e|or|)|senate committee on foreign relations|shipping board|supreme court|whig party|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united states ambassador to (?:afghanistan|austria|australia|canada|china|cuba|egypt|finland|france|germany|greece|hungary|iran|iraq|ireland|israel|italy|jamaica|japan|kenya|kosovo|kuwait|mexico|norway|pakistan|panama|romania|russia|saudi arabia|spain|syria|the united kingdom|the united nations))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united states ambassador to (?:afghanistan|austria|australia|canada|china|cuba|egypt|finland|france|germany|greece|hungary|iran|iraq|ireland|israel|italy|jamaica|japan|kenya|kosovo|kuwait|mexico|norway|pakistan|panama|romania|russia|saudi arabia|spain|syria|the united kingdom|the united nations))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united states department of (?:agriculture|commerce|education|energy|health and human services|homeland security|justice|labor|state|the interior|the treasury|transportation|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united states department of (?:agriculture|commerce|education|energy|health and human services|homeland security|justice|labor|state|the interior|the treasury|transportation|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united states house of representatives elections\, (\d{1,4}))\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united states house of representatives elections\, (\d{1,4}))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united states house elections\, (\d{1,4}))\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united states house elections\, (\d{1,4}))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united states secretary of (?:agriculture|commerce|education|energy|health and human services|homeland security|justice|state|the interior|the treasury|treasury|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united states secretary of (?:agriculture|commerce|education|energy|health and human services|homeland security|justice|state|the interior|the treasury|treasury|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united states senate elections\, (\d{1,4}))\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united states senate elections\, (\d{1,4}))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(us (?:congress|congress(?:m[ae]n|wom[ae]n|person)|electoral college|government|house of representatives|postal service|senat(?:e|or|)|secretary of state|state department|supreme court))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(us (?:congress|congress(?:m[ae]n|wom[ae]n|person)|electoral college|government|house of representatives|postal service|senat(?:e|or|)|secretary of state|state department|supreme court))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\. (?:attorney|congress|congress(?:m[ae]n|wom[ae]n|person)|electoral college|government|house of representatives|senat(?:e|or|)|secretary of state|securities and exchange commission|state department|supreme court))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\. (?:attorney|congress|congress(?:m[ae]n|wom[ae]n|person)|electoral college|government|house of representatives|senat(?:e|or|)|secretary of state|securities and exchange commission|state department|supreme court))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\.[ ]+(?:capitol|census bureau|code|congress|congress(?:m[ae]n|wom[ae]n|person)|constitution|east coast|electoral college|government|government printing office|house of representatives||lighthouse service|senat(?:e|or|)|shipping board|state|state department|supreme court))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\.[ ]+(?:capitol|census bureau|code|congress|congress(?:m[ae]n|wom[ae]n|person)|constitution|east coast|electoral college|government|government printing office|house of representatives||lighthouse service|senat(?:e|or|)|shipping board|state|state department|supreme court))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\. department of (?:agriculture|commerce|education|energy|health and human services|homeland security|justice|labor|state|the interior|the treasury|transportation|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\. department of (?:agriculture|commerce|education|energy|health and human services|homeland security|justice|labor|state|the interior|the treasury|transportation|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\. secretary of (?:agriculture|commerce|education|energy|health and human services|homeland security|justice|state|the interior|the treasury|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\. secretary of (?:agriculture|commerce|education|energy|health and human services|homeland security|justice|state|the interior|the treasury|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(us (?:capitol|census bureau|code|congress|congress(?:m[ae]n|wom[ae]n|person)|constitution|east coast|electoral college|government|government printing office|house of representatives||lighthouse service|senat(?:e|or|)|shipping board|state|state department|supreme court))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(us (?:capitol|census bureau|code|congress|congress(?:m[ae]n|wom[ae]n|person)|constitution|east coast|electoral college|government|government printing office|house of representatives||lighthouse service|senat(?:e|or|)|shipping board|state|state department|supreme court))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(us department of (?:agriculture|commerce|education|energy|health and human services|homeland security|justice|labor|state|the interior|the treasury|transportation|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(us department of (?:agriculture|commerce|education|energy|health and human services|homeland security|justice|labor|state|the interior|the treasury|transportation|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(us secretary of (?:agriculture|commerce|education|energy|health and human services|homeland security|justice|state|the interior|the treasury|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(us secretary of (?:agriculture|commerce|education|energy|health and human services|homeland security|justice|state|the interior|the treasury|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(vassal|very important person|veto|vice president of the united states|viceroy of india|viceroyalty|viceroyalty of (?:new spain|peru)|virginia general assembly|virtual museum of canada|viscount|voice of america|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(vassal|very important person|veto|vice president of the united states|viceroy of india|viceroyalty|viceroyalty of (?:new spain|peru)|virginia general assembly|virtual museum of canada|viscount|voice of america|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(wabanaki confederacy|watergate scandal|white house|worker|world health organization|works progress administration|world|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(wabanaki confederacy|watergate scandal|white house|worker|world health organization|works progress administration|world|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ymca|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ymca|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(2005 pan\-blue visits to mainland china|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(2005 pan\-blue visits to mainland china|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:central |local |municipal |)government)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:central |local |municipal |)government)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:economic |super|)power|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:economic |super|)power|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:democratic party|democratic\-republican party|electoral college|green party|national union party|republican party|whig party|) \(united states\))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:democratic party|democratic\-republican party|electoral college|green party|national union party|republican party|whig party|) \(united states\))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:conservative|labour|liberal|) party \(UK\))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:conservative|labour|liberal|) party \(UK\))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:first|second|third|fourth|fifth|sixth|seventh|eight|nonth|tenth|) united states congress)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:first|second|third|fourth|fifth|sixth|seventh|eight|nonth|tenth|) united states congress)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:democratic|republican) national convention)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:democratic|republican) national convention)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|idaho|illinois|indiana|iowa|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new hampshire|new jersey|new mexico|new york|north carolina|north dakota|ohio|oklahoma|oregon|pennsylvania|rhode island|south carolina|south dakota|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisonsin)\s(?:house of delegates|house of representatives|senate|state assembly|state legislature|state senate|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|idaho|illinois|indiana|iowa|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new hampshire|new jersey|new mexico|new york|north carolina|north dakota|ohio|oklahoma|oregon|pennsylvania|rhode island|south carolina|south dakota|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisonsin)\s(?:house of delegates|house of representatives|senate|state assembly|state legislature|state senate|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:monarchy?|sovereign)\|(king(?:dom|)|queen)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[Western world\|((?:The |)West(?:ern|erner|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:cabinet|minister) \(government\)\|(cabinet|minister)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:Illegal drug trade|drug traffic(?:king|))\|([^\]]*)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[capital (?:city)|\(political\)\|(capital)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(north|south|east|west|left|rights?)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:immigration\||)(immigra(tion|te[ds]?|nts?))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(colon|democrac|ecolog|econom|industr|monarch|monopol)(ies|y)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:colony|colonialism)\|(colon(?:ial|ialism|ies|y))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[political (?:corruption|party)\|(corrupt(?:ion|)|party)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[People of the United States\|(American)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(USD|US$|U\.?S\.? dollars?|United States dollars?)\|([^\]]+?)\]\]", "US$"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[Olympic Games\|([^\]]+?)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((summer |winter |)olympic(s|\sgames))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:radicalism\||)(radical(?:ism|s))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:city\||)(cit(?:y|ies|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:propaganda\||)(propagand(?:a|ist|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})nd congress|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})nd congress|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})rd congress|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})rd congress|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})st congress|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})st congress|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})th congress|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})th congress|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})nd congress|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})nd congress|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})rd congress|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})rd congress|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})st congress|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})st congress|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})th congress|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})th congress|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})nd congress|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})nd congress|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})rd congress|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})rd congress|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})st congress|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})st congress|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})th congress|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})st congress|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})nd united states congress|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})rd united states congress|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})rd united states congress|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})st united states congress|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})st united states congress|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})th united states congress|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})th united states congress|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})nd united states congress|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})nd united states congress|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})rd united states congress|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})rd united states congress|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})st united states congress|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})st united states congress|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})th united states congress|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})th united states congress|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})nd united states congress|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})nd united states congress|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})rd united states congress|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})rd united states congress|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})st united states congress|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})st united states congress|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})th united states congress|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})st united states congress|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) united states census|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) united states census|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) democratic national convention|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) democratic national convention|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) republican national convention|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) republican national convention|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) state of the union address|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) state of the union address|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) state of the union address|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,4}) state of the union address|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(canadian federal election\, (\d{1,4}))\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(canadian federal election\, (\d{1,4}))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united kingdom general election\, (\d{1,4}))\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united kingdom general election\, (\d{1,4}))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united states presidential election\, (\d{1,4}))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united states presidential election\, (\d{1,4}))\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(conservative party \(uk\) leadership election\, (\d{1,4}))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(conservative party \(uk\) leadership election\, (\d{1,4}))\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(albanian(?:s|)|african\-american|armenian(?:s|)|bedouin|bolshevik(?:s|)|bosniaks|canadian|cherokee|comanche|concubine|goth(?:s|)|greek(?:s|)|iroquois|jesuit|norman(?:s|)|ottoman turks|pole(?:s|)|russian(?:s|)|serb(?:s|)|shawnee|sioux|tribal chief|ukrainian(?:s|)|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(albanian(?:s|)|african\-american|armenian(?:s|)|bedouin|bolshevik(?:s|)|bosniaks|canadian|cherokee|comanche|concubine|goth(?:s|)|greek(?:s|)|iroquois|jesuit|norman(?:s|)|ottoman turks|pole(?:s|)|russian(?:s|)|serb(?:s|)|shawnee|sioux|tribal chief|ukrainian(?:s|)|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(baron(?:et|)|book of tang|dissident|eunuch \(court official\)|grand vizier|house of lords|new book of tang|new year honours|polish\-lithuanian commonwealth|secession|secret police|regent|roman senate|viceroy)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(baron(?:et|)|book of tang|dissident|eunuch \(court official\)|grand vizier|house of lords|new book of tang|new year honours|polish\-lithuanian commonwealth|secession|secret police|regent|roman senate|viceroy)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bourbon|english|meiji|) restoration)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bourbon|english|meiji|) restoration)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|) attorney general)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|) attorney general)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|) secretary of state)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|) secretary of state)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|) legislature)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|) legislature)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(lieutenant governor of (?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(lieutenant governor of (?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|)\'s (\d{1,1})st congressional district)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|)\'s (\d{1,1})st congressional district)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|)\'s (\d{1,1})th congressional district)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|)\'s (\d{1,1})th congressional district)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|)\'s (\d{1,1})nd congressional district)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|)\'s (\d{1,1})nd congressional district)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|)\'s (\d{1,1})rd congressional district)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|)\'s (\d{1,1})rd congressional district)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|)\'s (\d{1,2})st congressional district)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|)\'s (\d{1,2})st congressional district)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|)\'s (\d{1,2})th congressional district)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|)\'s (\d{1,2})th congressional district)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|)\'s (\d{1,2})nd congressional district)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|)\'s (\d{1,2})nd congressional district)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|)\'s (\d{1,2})rd congressional district)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|)\'s (\d{1,2})rd congressional district)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|) house of representatives)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|) house of representatives)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|) senate)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|) senate)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|) state legislature)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alabama|alaska|arizona|arkansas|california|colorado|connecticut|delaware|florida|georgia|hawaii|illinois|indiana|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new (?:engand|hampshire|jersey|mexico|york)|north (?:dakota|carolina)|ohio|oklahoma|oregon|pennsylvania|rhode island|south (?:dakota|carolina)|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|) state legislature)\]\]", "$1"); // //Delink international geography // //General geography related ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(census designated place|census\-designated place|location identifier|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(census designated place|census\-designated place|location identifier|)\]\]", "$1"); // //Countries and cities ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ceylon|chang'an|chechnya|chile|colombia|columbo|commonwealth of nations|crimea|croatia|cyprus|de jure|east coast of the united states|gallipoli|greenland|guatemala|indian mutiny|jayapura|jersey|jordan|kazakhstan|kenya|kosovo|kraków|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ceylon|chang'an|chechnya|chile|colombia|columbo|commonwealth of nations|crimea|croatia|cyprus|de jure|east coast of the united states|gallipoli|greenland|guatemala|indian mutiny|jayapura|jersey|jordan|kazakhstan|kenya|kosovo|kraków|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(laos|latvia|lebanon|le havre|lithuania|luoyang|manchuria|mesopotamia|middlesex|netherlands(?: east indies|)|new spain|nicaragua|nigeria|nova scotia|okinawa|ontario|oran|palestine|palau|panama|peru|pinyin|qing dynasty|riga|samoa|sardinia|serbia|shandong|sh[a|aa]nxi|siberia|slovakia|slovenia|socialist federal republic of yugoslavia|sudan|thrace|tinian|transylvania|trinidad|ussr|venezuela|victoria \(australia\)|west[ ]*(?:africa|minster|bank|coast of the united states|)|western (?:australia|sahara|)|winnipeg|yemen|yokohama|yugoslavia|sussex|trincomalee|toulouse|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(laos|latvia|lebanon|le havre|lithuania|luoyang|manchuria|mesopotamia|middlesex|netherlands(?: east indies|)|new spain|nicaragua|nigeria|nova scotia|okinawa|ontario|oran|palestine|palau|panama|peru|pinyin|qing dynasty|riga|samoa|sardinia|serbia|shandong|sh[a|aa]nxi|siberia|slovakia|slovenia|socialist federal republic of yugoslavia|sudan|thrace|tinian|transylvania|trinidad|ussr|venezuela|victoria \(australia\)|west[ ]*(?:africa|minster|bank|coast of the united states|)|western (?:australia|sahara|)|winnipeg|yemen|yokohama|yugoslavia|sussex|trincomalee|toulouse|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(falmouth\, cornwall|fiji|first french republic|flanders|florence|frankfurt|gda[n|ń]sk|geneva|genoa|glasgow|greenwich|guangzhou|helsinki|inchon|inner mongolia|islamabad|istanbul|jakarta|jerusalem|karachi|kiel|kie[lv]|kobe|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(falmouth\, cornwall|fiji|first french republic|flanders|florence|frankfurt|gda[n|ń]sk|geneva|genoa|glasgow|greenwich|guangzhou|helsinki|inchon|inner mongolia|islamabad|istanbul|jakarta|jerusalem|karachi|kiel|kie[lv]|kobe|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(lancashire|leeds|leningrad|libya|lima|lucerne|luxembourg|lisbon|london|luzon|madrid|malta|marianas|mauritius|milan|montreal|montreux|moscow|mozambique|mumbai|munich|netherlands east indies|new (?:brunswick|)|okinawa prefecture|ordu|osaka|queensland|paris|port\-au\-prince|portsmouth|poznań|prague|reykjavík|rotterdam|rouen|routledge|second polish republic|sichuan|sparta|sumatra|taiyuan|tibet|wales|warsaw|wessex|wilhelmshaven|york|vichy france|vladivostok|zambia|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(lancashire|leeds|leningrad|libya|lima|lucerne|luxembourg|lisbon|london|luzon|madrid|malta|marianas|mauritius|milan|montreal|montreux|moscow|mozambique|mumbai|munich|netherlands east indies|new (?:brunswick|)|okinawa prefecture|ordu|osaka|queensland|paris|port\-au\-prince|portsmouth|poznań|prague|reykjavík|rotterdam|rouen|routledge|second polish republic|sichuan|sparta|sumatra|taiyuan|tibet|wales|warsaw|wessex|wilhelmshaven|york|vichy france|vladivostok|zambia|)\]\]", "$1"); // //Cities and Counties (International) ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(Åland|a shau valley|aachen|abadan|abbasid(?: caliphate)|abbeville|abbottabad|abkhazia|abu (?:dhabi|ghraib)|abuja|acadia|acapulco|accra|achkhoy\-martan|achmer|a coruña|adana|addis ababa|adelaide|aden|adrianople|african union|agra|ahmadiyya|ain|aisne|aitape|aizu|ajaccio|akhalkalaki|akita prefecture|akramah|akyem|al (?:anbar|diwaniyah|garb|hillah)|al\-(?:anbar|andalus|garb|kut)|aliağa|al[a|e]manni|alang|albania|albuquerque|alberta|aldershot|alexandria|algarve|algeciras|algiers|alicante|allahabad|aleppo|allier|almada|alps|alpes\-(?:de\-haute\-provence|maritimes)|alsace|alsace\-lorraine|amapá|amazon (?:basin|rainforest)|ambarawa|amman|american (?:old west|samoa|south)|americas|amesbury|amiens|amman|amoy|amritsar|amsterdam|an khe|anatolia|anchorage|ancien régime|ancient egypt|ancona|andalusia|andhra pradesh|andorra|angaur|angers|anglesey|anglo\-saxons|angola|angus|anhui|anjou|ankara|ann(?:aba|apolis arbor)|ansbach|anschluss|antarctic(?:a| circle)|antibes|antigua|antioch|antofagasta|antwerp|anyang|anzio|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(Åland|a shau valley|aachen|abadan|abbasid(?: caliphate)|abbeville|abbottabad|abkhazia|abu (?:dhabi|ghraib)|abuja|acadia|acapulco|accra|achkhoy\-martan|achmer|a coruña|adana|addis ababa|adelaide|aden|adrianople|african union|agra|ahmadiyya|ain|aisne|aitape|aizu|ajaccio|akhalkalaki|akita prefecture|akramah|akyem|al (?:anbar|diwaniyah|garb|hillah)|al\-(?:anbar|andalus|garb|kut)|aliağa|al[a|e]manni|alang|albania|albuquerque|alberta|aldershot|alexandria|algarve|algeciras|algiers|alicante|allahabad|aleppo|allier|almada|alps|alpes\-(?:de\-haute\-provence|maritimes)|alsace|alsace\-lorraine|amapá|amazon (?:basin|rainforest)|ambarawa|amman|american (?:old west|samoa|south)|americas|amesbury|amiens|amman|amoy|amritsar|amsterdam|an khe|anatolia|anchorage|ancien régime|ancient egypt|ancona|andalusia|andhra pradesh|andorra|angaur|angers|anglesey|anglo\-saxons|angola|angus|anhui|anjou|ankara|ann(?:aba|apolis arbor)|ansbach|anschluss|antarctic(?:a| circle)|antibes|antigua|antioch|antofagasta|antwerp|anyang|anzio|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(apam|appalachia|appian|apulia|aquitaine|ar rutba|arab league|aragon|arbroath|arcadia|archangelsk|arctic[ ]*(?:circle|)|ardèche|ardennes|argos|argyll(?:shire| and bute|)|arica|arkhangelsk|armagh|armennes|armentières|arnhem|arqa|arras|arromanches(?:\-les\-bains)|artois|aruba|arundel|arzew|aschersleben|ashdod|ashkelon|asia[ ]*(?:minor|)|asmara|assam|assyria|asti|astrakhan|asturias|asuncion|athens|athlone|atlanta|atlantic canada|attica|attock|aube|auckland|aude|augsburg|aunis|australian capital territory|austria\-hungary|austro\-hungarian|austrian netherlands|avesnes\-le\-sec|avignon|avonmouth|avro|ayrshire|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(apam|appalachia|appian|apulia|aquitaine|ar rutba|arab league|aragon|arbroath|arcadia|archangelsk|arctic[ ]*(?:circle|)|ardèche|ardennes|argos|argyll(?:shire| and bute|)|arica|arkhangelsk|armagh|armennes|armentières|arnhem|arqa|arras|arromanches(?:\-les\-bains)|artois|aruba|arundel|arzew|aschersleben|ashdod|ashkelon|asia[ ]*(?:minor|)|asmara|assam|assyria|asti|astrakhan|asturias|asuncion|athens|athlone|atlanta|atlantic canada|attica|attock|aube|auckland|aude|augsburg|aunis|australian capital territory|austria\-hungary|austro\-hungarian|austrian netherlands|avesnes\-le\-sec|avignon|avonmouth|avro|ayrshire|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(b[|a|à] (?:[Đ|d][o|ồ]n|r[i|ị]a)|baalbek|ba\'athist iraq|babylon|babylonia|baden|baden\-württemberg|badajoz|bad (?:salzuflen|tölz|)|baden\-baden|baekje|baghdad|bahamas|bahariya oasis|bahrain|baja california|baku|bali|balikpapan|balkan(?:s|)|balkh|ballykelly\, county londonderry|ballyshannon|balochistan \(pakistan\)|baltic (?:region|states|)|baltimore|baltiysk|bamako|bamberg|banat|bangalore|bangkok|banja luka|banjul|bantheville|b[a|ả]o [Đ|d][a|ạ]i|baoding|baoji|bapaume|baquba(?:h)|barabash|barbary coast|bardia|barcelona|bari|barking|baroque|barrister|bas\-rhin|basel|basilan|basle|basque country \(autonomous community\)|basra|bastia|bastogne|batavian republic|baton rouge|batumi|bavaria|bayeux|bayonne|beachy head|beersheba|beijing|beirut|belarus|belfast|belfast lough|belfort|belgian congo|belgorod|belgrade|belize|benares|bellicourt|bengal|benghazi|benin|berchtesgaden|berezina|bergen|berlin|bermuda|bern|berwickshire|besançon|beslan|betio|bhutan|biak|białystok|bicester|bideford|bielefeld|bien hoa|biffontaine|bihać|bilad al\-sham|bilbao|binarville|binh long|bioko|birkenhead|birmingham|biscay|bitburg|bithynia|bitola|bizert[a|e]|black forest|bloemfontein)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(b[|a|à] (?:[Đ|d][o|ồ]n|r[i|ị]a)|baalbek|ba\'athist iraq|babylon|babylonia|baden|baden\-württemberg|badajoz|bad (?:salzuflen|tölz|)|baden\-baden|baekje|baghdad|bahamas|bahariya oasis|bahrain|baja california|baku|bali|balikpapan|balkan(?:s|)|balkh|ballykelly\, county londonderry|ballyshannon|balochistan \(pakistan\)|baltic (?:region|states|)|baltimore|baltiysk|bamako|bamberg|banat|bangalore|bangkok|banja luka|banjul|bantheville|b[a|ả]o [Đ|d][a|ạ]i|baoding|baoji|bapaume|baquba(?:h)|barabash|barbary coast|bardia|barcelona|bari|barking|baroque|barrister|bas\-rhin|basel|basilan|basle|basque country \(autonomous community\)|basra|bastia|bastogne|batavian republic|baton rouge|batumi|bavaria|bayeux|bayonne|beachy head|beersheba|beijing|beirut|belarus|belfast|belfast lough|belfort|belgian congo|belgorod|belgrade|belize|benares|bellicourt|bengal|benghazi|benin|berchtesgaden|berezina|bergen|berlin|bermuda|bern|berwickshire|besançon|beslan|betio|bhutan|biak|białystok|bicester|bideford|bielefeld|bien hoa|biffontaine|bihać|bilad al\-sham|bilbao|binarville|binh long|bioko|birkenhead|birmingham|biscay|bitburg|bithynia|bitola|bizert[a|e]|black forest|bloemfontein)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(bobruisk|bobruysk|bodø|boeotia|bogot[a|á]|bohemia|bolivia|bologna|bonaire|bône|bonn|bophuthatswana|bordeaux|borneo|bornholm|borzya|bosnia|bosnia and herzegovina|bosnia\-herzegovina|bosphorus|boston|boulogne|bourgeoisie|bournemouth|boyar|brandenburg|brasilia|bratislava|braunschweig|brecon|breda(?:\(netherlands\))|bremen\-vegesack|bremerhaven|bremerton|brescia|breslau|briansk|brightlingsea|brighton|brijuni|brindisi|brisbane|bristol|british (?:commonwealth|east africa|guiana|indian empire|north america|raj|somaliland|)|brooklands|brooklyn(?: heights)|bruges|brunei|brussels|bruyères|bryansk|bucharest|buckingham|buda(?:pest|)|bucovina|buenos aires|bugojno|buinaksk|bukhara|bulawayo|buleleng|bulgaria|burford|burgos|bursa|burundi|busan|bydgoszcz|byzantine|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(bobruisk|bobruysk|bodø|boeotia|bogot[a|á]|bohemia|bolivia|bologna|bonaire|bône|bonn|bophuthatswana|bordeaux|borneo|bornholm|borzya|bosnia|bosnia and herzegovina|bosnia\-herzegovina|bosphorus|boston|boulogne|bourgeoisie|bournemouth|boyar|brandenburg|brasilia|bratislava|braunschweig|brecon|breda(?:\(netherlands\))|bremen\-vegesack|bremerhaven|bremerton|brescia|breslau|briansk|brightlingsea|brighton|brijuni|brindisi|brisbane|bristol|british (?:commonwealth|east africa|guiana|indian empire|north america|raj|somaliland|)|brooklands|brooklyn(?: heights)|bruges|brunei|brussels|bruyères|bryansk|bucharest|buckingham|buda(?:pest|)|bucovina|buenos aires|bugojno|buinaksk|bukhara|bulawayo|buleleng|bulgaria|burford|burgos|bursa|burundi|busan|bydgoszcz|byzantine|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(c[a|á]diz|caen|cagliari|cairns|cairo|calabria|calamba city|calais|calcutta|calgary|california trail|caliph|callao|calvados|cam lo|camaroon|camberley|cambrai|cambridge|cammell laird|campania|campbeltown|c[a|ầ]n th[o|ơ]|canada (?:east|north|west|)|canadian rockies|canberra|cangzhou|Çankırı|cannes|cantabria|cantal|canterbury|cap\-haïtien|cape town|cappadocia|caracas|cardiff|carentan|caria|carinthia \(state\)|carlow|carribean|carrickfergus|carson city|carthage|casablanca|catalonia|catania|catford|cattaro|caucasus|caucasian iberia|cavite|cayenne|Čazma|cebu|celle|center for strategic and international studies|central (?:america|american|and Eastern Europe|java|)|cerdanya|cēsis|ceuta|chad|chambois|champa|chang\'an|changsha|changzhi|charleroi|chartres|chau doc|chavane|chefoo|cheltenham|chenai|chen shou|chengdu|cheppy|cherbourg|cherbourg\-octeville|cherchell|cherkassy|charleroi|ch[a|â]teau\-thierry|chennai|chernigov|chester|chicago|chichester|chihuahua \(state\)|chinwangtao|chipilly)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(c[a|á]diz|caen|cagliari|cairns|cairo|calabria|calamba city|calais|calcutta|calgary|california trail|caliph|callao|calvados|cam lo|camaroon|camberley|cambrai|cambridge|cammell laird|campania|campbeltown|c[a|ầ]n th[o|ơ]|canada (?:east|north|west|)|canadian rockies|canberra|cangzhou|Çankırı|cannes|cantabria|cantal|canterbury|cap\-haïtien|cape town|cappadocia|caracas|cardiff|carentan|caria|carinthia \(state\)|carlow|carribean|carrickfergus|carson city|carthage|casablanca|catalonia|catania|catford|cattaro|caucasus|caucasian iberia|cavite|cayenne|Čazma|cebu|celle|center for strategic and international studies|central (?:america|american|and Eastern Europe|java|)|cerdanya|cēsis|ceuta|chad|chambois|champa|chang\'an|changsha|changzhi|charleroi|chartres|chau doc|chavane|chefoo|cheltenham|chenai|chen shou|chengdu|cheppy|cherbourg|cherbourg\-octeville|cherchell|cherkassy|charleroi|ch[a|â]teau\-thierry|chennai|chernigov|chester|chicago|chichester|chihuahua \(state\)|chinwangtao|chipilly)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(cienfuegos|cisalpine gaul|city of westminster|cizre|charlottetown|chile|chimkent|chimoio|chittagong|chios|cholm|chongqing|christchurch|chu \(state\)|chuncheon|chuuk state|cilicia|cincinnati|city of (?:halifax|london|)|civitavecchia|cleveland|clonmel|clydebank|coahuila|cobh|cocanada|cochin|cochinchina|coele\-syria|coevorden|colchester|colmar|cologne|colonial brazil|colombo|colony of (?:natal|newfoundland|virginia|)|colorado springs|columbia|communes of france|comoros|compiègne|conakry|coney island|connacht|consenvoye|constantinople|continental (?:divide|portugal)|copenhagen|coquimbo|corfu|corinth|carinthia \(state\)|constanţa|contiguous united states|cornwall|corregidor|corsica|costa rica|côte d\'ivoire|country|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(cienfuegos|cisalpine gaul|city of westminster|cizre|charlottetown|chile|chimkent|chimoio|chittagong|chios|cholm|chongqing|christchurch|chu \(state\)|chuncheon|chuuk state|cilicia|cincinnati|city of (?:halifax|london|)|civitavecchia|cleveland|clonmel|clydebank|coahuila|cobh|cocanada|cochin|cochinchina|coele\-syria|coevorden|colchester|colmar|cologne|colonial brazil|colombo|colony of (?:natal|newfoundland|virginia|)|colorado springs|columbia|communes of france|comoros|compiègne|conakry|coney island|connacht|consenvoye|constantinople|continental (?:divide|portugal)|copenhagen|coquimbo|corfu|corinth|carinthia \(state\)|constanţa|contiguous united states|cornwall|corregidor|corsica|costa rica|côte d\'ivoire|country|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(county (?:antrim|armagh|cavan|clare|cork|donegal|down|dublin|durham|fermanagh|galway|hainaut|kerry|kildare|limerick|londonderry|mayo|meath|of tyrol|tipperary|tyrone|wexford|wicklow|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(county (?:antrim|armagh|cavan|clare|cork|donegal|down|dublin|durham|fermanagh|galway|hainaut|kerry|kildare|limerick|londonderry|mayo|meath|of tyrol|tipperary|tyrone|wexford|wicklow|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(county of (?:antrim|armagh|clare|cork|donegal|down|dublin|durham|fermanagh|galway|hainaut|kerry|kildare|limerick|londonderry|mayo|meath|tripoli|tyrol|tipperary|tyrone|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(county of (?:antrim|armagh|clare|cork|donegal|down|dublin|durham|fermanagh|galway|hainaut|kerry|kildare|limerick|londonderry|mayo|meath|tripoli|tyrol|tipperary|tyrone|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(courland|coventry|cowes|crailsheim|cranwell|crete|creuse|croydon|culdrose|cumberland(?: gap|)|cumbria|cunel|curaçao|cusco|cuxhaven|cyrenaica|częstochowa|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(courland|coventry|cowes|crailsheim|cranwell|crete|creuse|croydon|culdrose|cumberland(?: gap|)|cumbria|cunel|curaçao|cusco|cuxhaven|cyrenaica|częstochowa|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(da\'aba|dafniya|dagestan|daimyo|dakar|dak to|dallas|dalmuir|damascus|damietta|damour|da nang|danang|danzig|dardanelles|dar es salaam|darfur|darmstadt|dartford|daruvar|darwin\, northern territory|daugavpils|davao|deccan|deep south|dehradun|delhi|demerara|democratic republic of (?:congo|georgia|the congo|vietnam|)|demyansk|denmark|denmark\–norway|denver|deptford|derbent|derby|dernancourt|derry|des moines|desert|dessau|detroit|devon|dewsbury|dezful|dhahran|dhaka|dien bien phu|dijon|dinant|diwaniya|diyarbakır|diyatalawa|djedeida|dnieper|dniestr|dniester|dnipropetrovsk|dobruja|dodecanese|dogger bank|dominican (?:of newfoundland|republic|)|donbass|doncaster|donegal|donetsk‏‎|dong ha|donibristle|dordogne|dorset|dortmund|douai|dover|drenthe|dresden|drina|drogheda|druze|drvar|dual citizenship|dubai|dublin|dubrovnik|duisburg|dumbarton|dumfries|duncannon|dundalk|dunedin|dundee|dunfermline|dungannon|dungarvan|dunkerque|dunkirk|dunloy|durban|durham|duns|dunston|durrës|durres|düsseldorf|dutch east indies|duvno|duxford|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(da\'aba|dafniya|dagestan|daimyo|dakar|dak to|dallas|dalmuir|damascus|damietta|damour|da nang|danang|danzig|dardanelles|dar es salaam|darfur|darmstadt|dartford|daruvar|darwin\, northern territory|daugavpils|davao|deccan|deep south|dehradun|delhi|demerara|democratic republic of (?:congo|georgia|the congo|vietnam|)|demyansk|denmark|denmark\–norway|denver|deptford|derbent|derby|dernancourt|derry|des moines|desert|dessau|detroit|devon|dewsbury|dezful|dhahran|dhaka|dien bien phu|dijon|dinant|diwaniya|diyarbakır|diyatalawa|djedeida|dnieper|dniestr|dniester|dnipropetrovsk|dobruja|dodecanese|dogger bank|dominican (?:of newfoundland|republic|)|donbass|doncaster|donegal|donetsk|dong ha|donibristle|dordogne|dorset|dortmund|douai|dover|drenthe|dresden|drina|drogheda|druze|drvar|dual citizenship|dubai|dublin|dubrovnik|duisburg|dumbarton|dumfries|duncannon|dundalk|dunedin|dundee|dunfermline|dungannon|dungarvan|dunkerque|dunkirk|dunloy|durban|durham|duns|dunston|durrës|durres|düsseldorf|dutch east indies|duvno|duxford|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(early modern france|east (?:africa|anglia|asia|cowes|end of london|florida|frisia|indies|lothian|sussex|texas|)|eastern (?:bloc|macedonia|wu|)|eastleigh|ebensee|ednam|elbląg|ebro|edinburgh|edmonton|edo|efate|egersund|eilat|eindhoven|el alamein|elba|elbrus|emden|emsland|equator|equerry|epirus|erfurt|erie canal|eritrea|erzurum|essen|essex|estonia|ethiopian empire|euboea|eure|european russia|exeter|extremadura|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(early modern france|east (?:africa|anglia|asia|cowes|end of london|florida|frisia|indies|lothian|sussex|texas|)|eastern (?:bloc|macedonia|wu|)|eastleigh|ebensee|ednam|elbląg|ebro|edinburgh|edmonton|edo|efate|egersund|eilat|eindhoven|el alamein|elba|elbrus|emden|emsland|equator|equerry|epirus|erfurt|erie canal|eritrea|erzurum|essen|essex|estonia|ethiopian empire|euboea|eure|european russia|exeter|extremadura|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(fairbanks|fanti|faringdon|fastnet rock|fastov|faversham|federal republic of yugoslavia|federally administered tribal areas|fedhala|feodosia|feodosiya|fermanagh|fern pass|ferrara|fife|fiji|finistère|finland|finschhafen|fiume|flamborough head|flanders|flensburg|florianópolis|florida keys|foggia|folkestone|fornebu|fontainebleau|formosa|forres|fort worth|fortaleza|franche\-comté|franconia|frankfurt (?:am main|\(oder\))|free city of danzig|freetown|freiburg|fremantle|french (?:alps|equatorial africa|guinea|guiana|north africa|polynesia|riviera|tunisia|west africa|)|friedrichshafen|friesland|fujian|funafuti|f[ü|u]rth|füssen|fuzhou|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(fairbanks|fanti|faringdon|fastnet rock|fastov|faversham|federal republic of yugoslavia|federally administered tribal areas|fedhala|feodosia|feodosiya|fermanagh|fern pass|ferrara|fife|fiji|finistère|finland|finschhafen|fiume|flamborough head|flanders|flensburg|florianópolis|florida keys|foggia|folkestone|fornebu|fontainebleau|formosa|forres|fort worth|fortaleza|franche\-comté|franconia|frankfurt (?:am main|\(oder\))|free city of danzig|freetown|freiburg|fremantle|french (?:alps|equatorial africa|guinea|guiana|north africa|polynesia|riviera|tunisia|west africa|)|friedrichshafen|friesland|fujian|funafuti|f[ü|u]rth|füssen|fuzhou|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gabon|gaeta|galicia \(eastern europe\)|galicia \(spain\)|galilee|gallipoli|galveston|galway|gambia|gan yavne|gansu|gard|gare loch|gareloch|garonne|garwolin|gascony|gatineau|gaul|gaza|gaza strip|gazala|gdansk|gdańsk|gdov|gdynia|geilenkirchen|gela|gentry|germania inferior|gerolzhofen|gers|ghana|ghazni|ghe[di|nt]|gironde|givenchy|glomma|gloucester|goa|goguryeo|golan heights|gold coast \(british colony\)|gomel|goodwin sands|gospi[c|ć]|gosport|gotenhafen|gothenburg|gotland|göttingen|govan|gozo|gran columbia|grangemouth|grantham|graz|great (?:basin|moravia|yarmouth)|greater (?:khorasan|poland|st\. louis|)|greenham common|greenock|greenwich village|gr[a|e]nada|grenoble|grimsby|grodno|groningen \(province\)|grozny‏|guadeloupe|guanzhong|guildford|gujarat|guangdong|guangxi|guayaquil|guernsey|guilin|guilvinec|guinea|guinea\-bissau|gujarat|gulbene|gulf coast of the united states|gumbet|g[u|ü]tersloh|guyana|gwalior|gweedore|gwynedd|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gabon|gaeta|galicia \(eastern europe\)|galicia \(spain\)|galilee|gallipoli|galveston|galway|gambia|gan yavne|gansu|gard|gare loch|gareloch|garonne|garwolin|gascony|gatineau|gaul|gaza|gaza strip|gazala|gdansk|gdańsk|gdov|gdynia|geilenkirchen|gela|gentry|germania inferior|gerolzhofen|gers|ghana|ghazni|ghe[di|nt]|gironde|givenchy|glomma|gloucester|goa|goguryeo|golan heights|gold coast \(british colony\)|gomel|goodwin sands|gospi[c|ć]|gosport|gotenhafen|gothenburg|gotland|göttingen|govan|gozo|gran columbia|grangemouth|grantham|graz|great (?:basin|moravia|yarmouth)|greater (?:khorasan|poland|st\. louis|)|greenham common|greenock|greenwich village|gr[a|e]nada|grenoble|grimsby|grodno|groningen \(province\)|grozny|guadeloupe|guanzhong|guildford|gujarat|guangdong|guangxi|guayaquil|guernsey|guilin|guilvinec|guinea|guinea\-bissau|gujarat|gulbene|gulf coast of the united states|gumbet|g[u|ü]tersloh|guyana|gwalior|gweedore|gwynedd|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(h\. h\. asquith|haaretz|habbaniyah|habsburg(?: austria|)|hadith|hadrian|hai(?:fa|nan|phong| phong|duong)|halberstadt|halifax regional municipality|halle \(saale\)|halmahera|hama|hamburg|hampton(?: roads)|hana[u|n]|hangul|hangzhou|hanja|hannover|hannut|hanzhong|harare|harlem|harrogate|haugesund|haut\-(?:corse|garonne|marne|rhin|)|hejaz|heligoland|hellespont|henley\-on\-thames|heraklion|herdla|herford|hesse|high walker|homs|hanoi|hanover|harbin|harstad|hartlepool|harwich|havana|hebburn|hebei|hebrides|hebron|hefei|heidelberg|heliopolis \(cairo suburb\)|helmand|helston|henan|hendon|herat|hereford(?:shire|)|hersbruck|herzegovina|herzogenaurach|high commission|hilo|himalayas|hispania|hispaniola|historic scotland|h[i|ī]t|hobart|ho chi minh city|hokkaid[o|ō]|holyhead|holy loch|holstein|home office|honolulu|honduras|hong kong|honghu|honiara|honsh[u|ū]|horten|houston|hove|höxter|hudson valley|hue|huế|humber|hunan|hungerford|hungnam|huntingdon|hyderabad state|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(h\. h\. asquith|haaretz|habbaniyah|habsburg(?: austria|)|hadith|hadrian|hai(?:fa|nan|phong| phong|duong)|halberstadt|halifax regional municipality|halle \(saale\)|halmahera|hama|hamburg|hampton(?: roads)|hana[u|n]|hangul|hangzhou|hanja|hannover|hannut|hanzhong|harare|harlem|harrogate|haugesund|haut\-(?:corse|garonne|marne|rhin|)|hejaz|heligoland|hellespont|henley\-on\-thames|heraklion|herdla|herford|hesse|high walker|homs|hanoi|hanover|harbin|harstad|hartlepool|harwich|havana|hebburn|hebei|hebrides|hebron|hefei|heidelberg|heliopolis \(cairo suburb\)|helmand|helston|henan|hendon|herat|hereford(?:shire|)|hersbruck|herzegovina|herzogenaurach|high commission|hilo|himalayas|hispania|hispaniola|historic scotland|h[i|ī]t|hobart|ho chi minh city|hokkaid[o|ō]|holyhead|holy loch|holstein|home office|honolulu|honduras|hong kong|honghu|honiara|honsh[u|ū]|horten|houston|hove|höxter|hudson valley|hue|huế|humber|hunan|hungerford|hungnam|huntingdon|hyderabad state|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ia drang valley|iași|ibadan|icheon|ilkhanate|illesheim|illyricum \(roman province\)|illyria|incheon|indian subcontinent|indianapolis|indo\-china|ingushetia|innsbruck|inverkeithing|inverness|ioannina|ionia|ipswich|iquique|iraqi kurdistan|irish free state|irkutsk|irthlingborough|isfahan|ismaïlia|istria|italian (?:east africa|libya|somaliland|)|iwi|İzmir|izyum|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ia drang valley|iași|ibadan|icheon|ilkhanate|illesheim|illyricum \(roman province\)|illyria|incheon|indian subcontinent|indianapolis|indo\-china|ingushetia|innsbruck|inverkeithing|inverness|ioannina|ionia|ipswich|iquique|iraqi kurdistan|irish free state|irkutsk|irthlingborough|isfahan|ismaïlia|istria|italian (?:east africa|libya|somaliland|)|iwi|İzmir|izyum|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(jaffa|jaffna|jajce|jaluit atoll|jalalabad|jalandhar|jammu and kashmir|jan matejko|jarrow|java|jayapura|jeddah|jembrana|jena|jenin|jericho|jhansi|jiang[su|xi]|jilin|jin dynasty \(265\–420\)|jingzhou|jingzhou \(ancient china\)|jiujiang|jodoigne|jinsen|johannesburg|johor|jolo|jorhat|jordan|jos|judea|jutland|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(jaffa|jaffna|jajce|jaluit atoll|jalalabad|jalandhar|jammu and kashmir|jan matejko|jarrow|java|jayapura|jeddah|jembrana|jena|jenin|jericho|jhansi|jiang[su|xi]|jilin|jin dynasty \(265\–420\)|jingzhou|jingzhou \(ancient china\)|jiujiang|jodoigne|jinsen|johannesburg|johor|jolo|jorhat|jordan|jos|judea|jutland|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(kabardino\-balkaria|kabul|kaduna|kaesong|kagoshima prefecture|kaifeng|kaiserslautern|kagoshima|kakul|kalach\-na\-donu|kaliningrad(?: oblast)|kaluga|kamchatka|kamerun|kandahar|kandy|kansas territory|kantō region|kaohsiung|kapan|karbala|karelia|karlovac|karls(?:krona|ruhe|)|karnataka|karpathos|kars|karwar|kaspiysk|kassel|katowice|kattegat|katterbach|kauai|kaunas|kavieng|kazakhstan|kazan|kazoku)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(kabardino\-balkaria|kabul|kaduna|kaesong|kagoshima prefecture|kaifeng|kaiserslautern|kagoshima|kakul|kalach\-na\-donu|kaliningrad(?: oblast)|kaluga|kamchatka|kamerun|kandahar|kandy|kansas territory|kantō region|kaohsiung|kapan|karbala|karelia|karlovac|karls(?:krona|ruhe|)|karnataka|karpathos|kars|karwar|kaspiysk|kassel|katowice|kattegat|katterbach|kauai|kaunas|kavieng|kazakhstan|kazan|kazoku)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(keelung|kensington|kent|kép|kerala|kerama retto|ketch|key west|khabarovsk|khalis|kharga oasis|kharkiv|kharkov|khartoum|khasavyurt|khe sanh|kherson|khimki|khyber pakhtunkhwa|khums|kibbutz|kidlington|kiel|kiel canal|kielce|kievan rus\'|kilindini|kilkenny|kingston (?:ontario|upon hull|)|kinsale|kinshasa|kintyre|kiryat malachi|kiribati|kirkenes|kirkuk|kirkwall|kirovograd|kirovohrad|kiska|klagenfurt|klaipėda|knin|kochi|koei|koh tang|kohat|koje do|koknese|koku|kokura|kola (?:inlet|)|kolhapur|kolkata|kolomna|königsberg|koper|koprivnica|kos|kossol (?:passage|roads)|kotor|kourou|kozhikode|kraljevo|krasnodar|krasnoyarsk|kremenchu(?:g|k)|kresy|kristiansand|kuala lumpur|kuban|kufa|kufra|kunar province|kunming|kunsan|kurdistan|kure|kurgan|kursk|kut(?:aisi)|kuwait city|kwajalein|kwantung leased territory|kyoto|kyrgyzstan|ky[u|ū]sh[u|ū]|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(keelung|kensington|kent|kép|kerala|kerama retto|ketch|key west|khabarovsk|khalis|kharga oasis|kharkiv|kharkov|khartoum|khasavyurt|khe sanh|kherson|khimki|khyber pakhtunkhwa|khums|kibbutz|kidlington|kiel|kiel canal|kielce|kievan rus\'|kilindini|kilkenny|kingston (?:ontario|upon hull|)|kinsale|kinshasa|kintyre|kiryat malachi|kiribati|kirkenes|kirkuk|kirkwall|kirovograd|kirovohrad|kiska|klagenfurt|klaipėda|knin|kochi|koei|koh tang|kohat|koje do|koknese|koku|kokura|kola (?:inlet|)|kolhapur|kolkata|kolomna|königsberg|koper|koprivnica|kos|kossol (?:passage|roads)|kotor|kourou|kozhikode|kraljevo|krasnodar|krasnoyarsk|kremenchu(?:g|k)|kresy|kristiansand|kuala lumpur|kuban|kufa|kufra|kunar province|kunming|kunsan|kurdistan|kure|kurgan|kursk|kut(?:aisi)|kuwait city|kwajalein|kwantung leased territory|kyoto|kyrgyzstan|ky[u|ū]sh[u|ū]|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(la (?:ciotat|jolla|spezia)|labrador|ladakh|laconia|lae|lagos|lahore|lajes \(praia da vitória\)|landeck|landgraviate of hesse\-kassel|landsberg am lech|lang vei|languedoc|larissa|lanarkshire|lashkar gar|latakia|latgale|latifiya|latin empire|lausanne|le catelet|lebanon|leicester|leiden|leinster|leipzig|leith|le mans|lemnos|lenape|leningrad oblast|lesbos|lesotho|lesser (?:antilles|poland)|leuven|levant|lewes|lewis|liaoning|libyan desert|licata|liechtenstein|liège|liepāja|liguria|lihula|lika|lille|limerick|linfen|linthouse|linz|lippstadt|lisburn|littlehampton|liverpool|livno|livonia|livorno|livy|ljubljana|l[o|ộ]c ninh|loch (?:ewe|long|)|lockerbie|lod|Łódź|loire|lombardy|long (?:island|xuy[ê|e]n)|longitude|longwy|lorraine \(province\)|los angeles(?: county)|loughborough|louisbourg|louisiana (?:purchase|\(new france\))|lowestoft|lower (?:austria|canada|saxony|silesia|)|lu\'an|luanda|lübeck|lublin|lubny|lucknow|ludwigshafen|lugger|luhansk|lundy|lüneburg|luneville|luoyang|lusatia|lüshun|luxor|luzon|lviv|lwów|lympne|lyon|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(la (?:ciotat|jolla|spezia)|labrador|ladakh|laconia|lae|lagos|lahore|lajes \(praia da vitória\)|landeck|landgraviate of hesse\-kassel|landsberg am lech|lang vei|languedoc|larissa|lanarkshire|lashkar gar|latakia|latgale|latifiya|latin empire|lausanne|le catelet|lebanon|leicester|leiden|leinster|leipzig|leith|le mans|lemnos|lenape|leningrad oblast|lesbos|lesotho|lesser (?:antilles|poland)|leuven|levant|lewes|lewis|liaoning|libyan desert|licata|liechtenstein|liège|liepāja|liguria|lihula|lika|lille|limerick|linfen|linthouse|linz|lippstadt|lisburn|littlehampton|liverpool|livno|livonia|livorno|livy|ljubljana|l[o|ộ]c ninh|loch (?:ewe|long|)|lockerbie|lod|Łódź|loire|lombardy|long (?:island|xuy[ê|e]n)|longitude|longwy|lorraine \(province\)|los angeles(?: county)|loughborough|louisbourg|louisiana (?:purchase|\(new france\))|lowestoft|lower (?:austria|canada|saxony|silesia|)|lu\'an|luanda|lübeck|lublin|lubny|lucknow|ludwigshafen|lugger|luhansk|lundy|lüneburg|luneville|luoyang|lusatia|lüshun|luxor|luzon|lviv|lwów|lympne|lyon|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(maastricht|macau|macedon|macedonia \(roman province\)|maceió|madagascar|madang|madeira|madras|madagascar|madang|magdeburg|maharashtra|mahón|magas|magelang|maghreb|maidanah|maidstone|mainland china|mainz|majorca|majuro|makassar|makhachkala|makin atoll|maktar|malacca|m[a|á]laga|malatya|malawi|malbork|malgobek|mali|malmö|maloelap|małopolska|malta|malvern hill|manado|manchester|manche|manchu|mandalay|manhatt[a|e]n|manicaland|mani(?:la|lla|)|manipur|manitoba|mannheim|mantua|maputo|mar del plata|maracay|maritimes|mariveles|marianas|marjah|marseille(?:s|)|masovia|massachusetts bay colony|massawa|matabeleland|matsuwa|maubeuge|maui|mauritania|mauritius|mayotte|mecklinburg|medell[i|í]n|medes|medina|medway|meerut|mekong|melbourne|melilla|menen|merauke|meridian \(geography\)|mersa matruh|mercia|mesopotamia|messina|messenia|methil|meuse|mexico city|mhow|miami|mianyang|middle east|middlesbrough|midwestern united states|miechów|milford haven|millerovo|milwaukee|minden|minorca|mindoro|minneapolis|minsk|misrata|mississippi valley|mius|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(maastricht|macau|macedon|macedonia \(roman province\)|maceió|madagascar|madang|madeira|madras|madagascar|madang|magdeburg|maharashtra|mahón|magas|magelang|maghreb|maidanah|maidstone|mainland china|mainz|majorca|majuro|makassar|makhachkala|makin atoll|maktar|malacca|m[a|á]laga|malatya|malawi|malbork|malgobek|mali|malmö|maloelap|małopolska|malta|malvern hill|manado|manchester|manche|manchu|mandalay|manhatt[a|e]n|manicaland|mani(?:la|lla|)|manipur|manitoba|mannheim|mantua|maputo|mar del plata|maracay|maritimes|mariveles|marianas|marjah|marseille(?:s|)|masovia|massachusetts bay colony|massawa|matabeleland|matsuwa|maubeuge|maui|mauritania|mauritius|mayotte|mecklinburg|medell[i|í]n|medes|medina|medway|meerut|mekong|melbourne|melilla|menen|merauke|meridian \(geography\)|mersa matruh|mercia|mesopotamia|messina|messenia|methil|meuse|mexico city|mhow|miami|mianyang|middle east|middlesbrough|midwestern united states|miechów|milford haven|millerovo|milwaukee|minden|minorca|mindoro|minneapolis|minsk|misrata|mississippi valley|mius|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(modena|moerdijk|moesia|mogadishu|mohmand valley|moiré|moldova|moluccas|mombasa|mombassa|monaco|mongolia|monmouthshire \(historic\)|monocoque|monrovia|monte carlo|montbrehain|montélimar|montenegro|monterrey|montevideo|montpellier|moorslede|moravia|morbihan|morea|morlaix|morotai|moselle|mosquito coast|mostar|mosul|moudros|mount athos|mozdok|mudros|mughal empire|muqdadiyah|murgon|muscovy|multan|münster|murcia|mutare|my tho|myanmar|mycenae|mykolaiv|mysore|mytilene|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(modena|moerdijk|moesia|mogadishu|mohmand valley|moiré|moldova|moluccas|mombasa|mombassa|monaco|mongolia|monmouthshire \(historic\)|monocoque|monrovia|monte carlo|montbrehain|montélimar|montenegro|monterrey|montevideo|montpellier|moorslede|moravia|morbihan|morea|morlaix|morotai|moselle|mosquito coast|mostar|mosul|moudros|mount athos|mozdok|mudros|mughal empire|muqdadiyah|murgon|muscovy|multan|münster|murcia|mutare|my tho|myanmar|mycenae|mykolaiv|mysore|mytilene|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(nablus|nadi|nagasaki|nagorno\-karabakh|nagoya|nairobi|najaf|nalchik|namibia|nanchang|nangarhar|nanjing|nanking|nantes|nantucket|naples|narbonne|narew|narkomat|narva|narvik|naseby|nashville|nasiriyah|nation|naumburg|nauru|navan|navarre|naxxar|nazareth|nazran|near east|necochea|negev|netivot|neuss|nevis|niamey|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(nablus|nadi|nagasaki|nagorno\-karabakh|nagoya|nairobi|najaf|nalchik|namibia|nanchang|nangarhar|nanjing|nanking|nantes|nantucket|naples|narbonne|narew|narkomat|narva|narvik|naseby|nashville|nasiriyah|nation|naumburg|nauru|navan|navarre|naxxar|nazareth|nazran|near east|necochea|negev|netivot|neuss|nevis|niamey|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(new (?:amsterdam|britain|caledonia|delhi|england|france|georgia|guinea|hebrides|netherland|netherlands|orleans|providence|ross|south hampton|south wales|world|york city|zealand|)|newburyport|newcastle upon tyne|newfoundland and labrador|new south (?:hampton|wales|)|newport(?: news)|newry|nha trang|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(new (?:amsterdam|britain|caledonia|delhi|england|france|georgia|guinea|hebrides|netherland|netherlands|orleans|providence|ross|south hampton|south wales|world|york city|zealand|)|newburyport|newcastle upon tyne|newfoundland and labrador|new south (?:hampton|wales|)|newport(?: news)|newry|nha trang|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(niagara falls|nias|nice|nico(?:media|sia)|niger|nigeria|niihau|nijmeg[a|e]n|nile delta|nîmes|ningxia|niš|nisei|nizhny novgorod|noemfoor|nord\-pas\-de\-calais|nore|norfolk|north (?:america|caucasus|chicago|ossetia|pole|rhine\-westphalia|riding of yorkshire|shields|sulawesi|wales|)|northeastern united states|northampton|northfleeet|northern (?:africa|canada|dvina|england|europe|italy|kentucky|wei|zhou|)|north\-west frontier province \(1901\–1955\)|northwest territories|northumberland|norwich|nottingham(?:shire|)|noum[e|é]a|novgorod|novi sad|novosibirsk|novorossiysk|nowra|nubia|numfor|numidia|nuremberg|nuristan|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(niagara falls|nias|nice|nico(?:media|sia)|niger|nigeria|niihau|nijmeg[a|e]n|nile delta|nîmes|ningxia|niš|nisei|nizhny novgorod|noemfoor|nord\-pas\-de\-calais|nore|norfolk|north (?:america|caucasus|chicago|ossetia|pole|rhine\-westphalia|riding of yorkshire|shields|sulawesi|wales|)|northeastern united states|northampton|northfleeet|northern (?:africa|canada|dvina|england|europe|italy|kentucky|wei|zhou|)|north\-west frontier province \(1901\–1955\)|northwest territories|northumberland|norwich|nottingham(?:shire|)|noum[e|é]a|novgorod|novi sad|novosibirsk|novorossiysk|nowra|nubia|numfor|numidia|nuremberg|nuristan|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(oahu|oakland|oban|obelisk|oceania|oder|odessa|odisha|ofakim|ohrid|oklahoma city|oko|oldenburg|olomouc|olonets|olongapo|oman|omsk|orange free state|oranienburg|oregon (?:inlet|trail)|orenburg|orinoco|orkney|orléans|orne|ors|orsha|oryol|osan|oschersleben|oshawa|osijek|oslo|oslofjord|osnabrück|ostend|otranto|ottawa|oudtshoorn|outer hebrides|overijssel|oxford|oyo state|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(oahu|oakland|oban|obelisk|oceania|oder|odessa|odisha|ofakim|ohrid|oklahoma city|oko|oldenburg|olomouc|olonets|olongapo|oman|omsk|orange free state|oranienburg|oregon (?:inlet|trail)|orenburg|orinoco|orkney|orléans|orne|ors|orsha|oryol|osan|oschersleben|oshawa|osijek|oslo|oslofjord|osnabrück|ostend|otranto|ottawa|oudtshoorn|outer hebrides|overijssel|oxford|oyo state|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(pacific northwest|paderborn|padua|pago pago|paisley|palaus|palawan|palembang|palermo|palestinian territories|palmyra|panama|panama city|panay|pannonia|pantelleria|pápa|papeete|papua new guinea|pará|paraguay|paramushiro|paris|parthia|partition of india|parwan|pas de calais|pas\-de\-calais|passchendaele|patagonia|patras|patrikios|peenemünde|peking|pella|penang|penghu|pensacola|perama|pergamum|perm|pernambuco|perpignan|perth|peru|pescadores|pescara|peshawa|peshawar|peterhead|petrograd|philadelphia|phnom penh|phoenicia|phrygia|phu cat|piacenza|picardy|piedmont|pillau|pinyin|piraeus|piryatin|pisa|pisek|pittsburgh|plain of jars|pleiku|płock|ploesti|plymouth|plzeň|plovdiv|po valley|podolia|pogrom|pohang|pohnpei|point loma|pointe noire|poitiers|poitou|polotsk|poltava|pomerania|ponta delgada|pontus|port au prince|portsmouth|portuguese (?:angola|cape verde|guinea|mozambique|)|potsdam|prestwick|pretoria|pristina|priština|pronville|prostějov|provence|province(?: of carolina)|provinces of sweden|prut|przemyśl|pskov|puebla|puerto cabello|puglia|pula|pune|punjab \(british inia\)|punjab \(pakistan\)|punjab region|punta arenas|purim|pusan|pyatigorsk|pyongtaek|p\'yongyang|pyongyang|pyrénées\-atlantiques|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(pacific northwest|paderborn|padua|pago pago|paisley|palaus|palawan|palembang|palermo|palestinian territories|palmyra|panama|panama city|panay|pannonia|pantelleria|pápa|papeete|papua new guinea|pará|paraguay|paramushiro|paris|parthia|partition of india|parwan|pas de calais|pas\-de\-calais|passchendaele|patagonia|patras|patrikios|peenemünde|peking|pella|penang|penghu|pensacola|perama|pergamum|perm|pernambuco|perpignan|perth|peru|pescadores|pescara|peshawa|peshawar|peterhead|petrograd|philadelphia|phnom penh|phoenicia|phrygia|phu cat|piacenza|picardy|piedmont|pillau|pinyin|piraeus|piryatin|pisa|pisek|pittsburgh|plain of jars|pleiku|płock|ploesti|plymouth|plzeň|plovdiv|po valley|podolia|pogrom|pohang|pohnpei|point loma|pointe noire|poitiers|poitou|polotsk|poltava|pomerania|ponta delgada|pontus|port au prince|portsmouth|portuguese (?:angola|cape verde|guinea|mozambique|)|potsdam|prestwick|pretoria|pristina|priština|pronville|prostějov|provence|province(?: of carolina)|provinces of sweden|prut|przemyśl|pskov|puebla|puerto cabello|puglia|pula|pune|punjab \(british inia\)|punjab \(pakistan\)|punjab region|punta arenas|purim|pusan|pyatigorsk|pyongtaek|p\'yongyang|pyongyang|pyrénées\-atlantiques|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(qatar|qingdao|quebec city|quemoy|quetta|qinghai|que son valley|quebec|quang (?:tin|tri)|queens|quelimane|quezon city|quillota|quito|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(qatar|qingdao|quebec city|quemoy|quetta|qinghai|que son valley|quebec|quang (?:tin|tri)|queens|quelimane|quezon city|quillota|quito|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(rabat|rabaul|radom|rafah|rajasthan|rakhine state|ralingen|ramadi|ramallah|ramla|rangoon|rastenburg|ravenna|rawalpindi|recife|red square|regensburg|reggio calabria|reims|remagen|renault|renfrewshire|rennes|republic of (?:genoa|macedonia|the congo|the philippines|turkey|)|réunion|rheims|rhineland\-palatinate|rhodes(?:ia)|rhone|riau|richborough|r[i|í]o (?:de janeiro|de la plata|grande do sul)|risalpur|riyadh|rijeka|rimini|rochefort\, charente\-maritime|rochefort \(charente\-maritime\)|rockall|rogatica|roi\-namur|rome|rønne|ronssoy|rostock|rostov(?:\-on\-don)|rosyth|rovaniemi|royal tunbridge wells|r[u|ü]gen|ruhland|ruhr|rumelia|runnymede|russian (?:far east|federation|)|rwanda|ryazan|ryukyus|rzhev|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(rabat|rabaul|radom|rafah|rajasthan|rakhine state|ralingen|ramadi|ramallah|ramla|rangoon|rastenburg|ravenna|rawalpindi|recife|red square|regensburg|reggio calabria|reims|remagen|renault|renfrewshire|rennes|republic of (?:genoa|macedonia|the congo|the philippines|turkey|)|réunion|rheims|rhineland\-palatinate|rhodes(?:ia)|rhone|riau|richborough|r[i|í]o (?:de janeiro|de la plata|grande do sul)|risalpur|riyadh|rijeka|rimini|rochefort\, charente\-maritime|rochefort \(charente\-maritime\)|rockall|rogatica|roi\-namur|rome|rønne|ronssoy|rostock|rostov(?:\-on\-don)|rosyth|rovaniemi|royal tunbridge wells|r[u|ü]gen|ruhland|ruhr|rumelia|runnymede|russian (?:far east|federation|)|rwanda|ryazan|ryukyus|rzhev|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(saint[ ]*(?:augustine, florida|\-domingue|\-germain\-en\-laye|\-lô|\-omer|helena|john\, u\.s\. virgin islands|kitts|louis|lucia|malo|nazaire|omer|petersburg|thomas\, u\.s\. virgin islands|\-tropez|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(saint[ ]*(?:augustine, florida|\-domingue|\-germain\-en\-laye|\-lô|\-omer|helena|john\, u\.s\. virgin islands|kitts|louis|lucia|malo|nazaire|omer|petersburg|thomas\, u\.s\. virgin islands|\-tropez|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(st\. (?:augustine, florida|\-domingue|eustatius|\-germain\-en\-laye|\-lô|\-omer|helena|john\, u\.s\. virgin islands|louis|lucia|malo|nazaire|omer|petersburg|thomas\, u\.s\. virgin islands|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(st\. (?:augustine, florida|\-domingue|eustatius|\-germain\-en\-laye|\-lô|\-omer|helena|john\, u\.s\. virgin islands|louis|lucia|malo|nazaire|omer|petersburg|thomas\, u\.s\. virgin islands|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(st (?:augustine, florida|\-domingue|eustatius|\-germain\-en\-laye|\-lô|\-omer|helena|john\, u\.s\. virgin islands|louis|lucia|malo|nazaire|omer|petersburg|thomas\, u\.s\. virgin islands|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(st (?:augustine, florida|\-domingue|eustatius|\-germain\-en\-laye|\-lô|\-omer|helena|john\, u\.s\. virgin islands|louis|lucia|malo|nazaire|omer|petersburg|thomas\, u\.s\. virgin islands|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(s[a|ã]o paulo|saarbrücken|saaremaa|saarland|sacramento|sadr city|saffron walden|sahara|sahel|saigon|saipan|salamanca|salamaua|salerno|salisbury(?: plain)|salla|sallum|salonika|salt lake city|salzburg|salzwedel|samar(?:ra|kand|)|samnium|samogitia|samos|san (?:angelo|diego county|marino|sebastián)|sandomierz|sangin|sanmenxia|santa (?:barbara|maria de belém|monica|)|santiago de cuba|santo domingo|sapporo|sarajevo|saratov|sarawak|sardis|sargodha|sasanian empire|saskatoon|saskatchewan|sassanid(?: persia|)|satrap|sava|savoy|savannah|saxony(?:\-anhalt|)|scandinavia|scania|scheldt|schiedam|schleswig\-holstein|schweinfurt|scilly|scotstoun|scottish highlands|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(s[a|ã]o paulo|saarbrücken|saaremaa|saarland|sacramento|sadr city|saffron walden|sahara|sahel|saigon|saipan|salamanca|salamaua|salerno|salisbury(?: plain)|salla|sallum|salonika|salt lake city|salzburg|salzwedel|samar(?:ra|kand|)|samnium|samogitia|samos|san (?:angelo|diego county|marino|sebastián)|sandomierz|sangin|sanmenxia|santa (?:barbara|maria de belém|monica|)|santiago de cuba|santo domingo|sapporo|sarajevo|saratov|sarawak|sardis|sargodha|sasanian empire|saskatoon|saskatchewan|sassanid(?: persia|)|satrap|sava|savoy|savannah|saxony(?:\-anhalt|)|scandinavia|scania|scheldt|schiedam|schleswig\-holstein|schweinfurt|scilly|scotstoun|scottish highlands|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(seattle|second bulgarian empire|seine(?:|\-et\-marne\-maritime|)|sejm|seletar|semarang|semipalatinsk|serres|seville|seychelles|senegal|seoul|sfr yugoslavia|shaanxi|shaizar|shandong|shanghai|shatoy|sheffield|shetland|shijiazhuang|shikoku|shkodër|shreveport|shrewsbury|shrivenham|shumshu|sialkot|siam|Šibenik|siberia|sibiu|sichuan|sidi barrani|sidon|siena|sienna|sierra (?:leone|nevada \(u\.s\.\))|silesia|silicon valley|silistra|silla|silopi|simonstown|sinai desert|sindh|singapore|sinn féin|sinti|sintra|Šipovo|sirte|sisak|siwa oasis|skagerrak|skopje|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(seattle|second bulgarian empire|seine(?:|\-et\-marne\-maritime|)|sejm|seletar|semarang|semipalatinsk|serres|seville|seychelles|senegal|seoul|sfr yugoslavia|shaanxi|shaizar|shandong|shanghai|shatoy|sheffield|shetland|shijiazhuang|shikoku|shkodër|shreveport|shrewsbury|shrivenham|shumshu|sialkot|siam|Šibenik|siberia|sibiu|sichuan|sidi barrani|sidon|siena|sienna|sierra (?:leone|nevada \(u\.s\.\))|silesia|silicon valley|silistra|silla|silopi|simonstown|sinai desert|sindh|singapore|sinn féin|sinti|sintra|Šipovo|sirte|sisak|siwa oasis|skagerrak|skopje|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(slavonia|smolensk|smyrna|sochi|socialist federal republic of yugoslavia|socotra|soesterberg|sofia|soissons|solent|solomons|somaliland|somerset|somme|sonora|south (?:american|caucasus|east england|florida|sudan|texas|yemen)|southend(?:\-on\-sea)|southern (?:california|europe|lebanon|netherlands|ontario|rhodesia|)|south(?:ampton|sea)|southeastern europe|southwestern united states|soviet (?:east asia|far east|)|spanish (?:florida|morocco|)|spilsby|spithead|srb|sri lanka|srinagar|st\.petersburg|staden|stadskanaal|stalingrad|stalino|state duma|staten island|stavanger|stavropol|stendal|stettin|stirling|stockholm|strabo|strängnäs|strasbourg|stralsund|state of vietnam|strait|staraya russa|sturmabteilung|stuttgart|styria|subcontinent|sub\-saharan africa|suez|suffolk|sulawesi|sulu|sumatra|surabaya|surakarta|suriname|surrey|surya|susa|sutherland|suva|suzerainty|suzhou|svalbard|swabia|swahili coast|swaziland|swedish pomerania|swiss alps|sydney|syria \(roman province\)|syrmia|szczecin|szlachta|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(slavonia|smolensk|smyrna|sochi|socialist federal republic of yugoslavia|socotra|soesterberg|sofia|soissons|solent|solomons|somaliland|somerset|somme|sonora|south (?:american|caucasus|east england|florida|sudan|texas|yemen)|southend(?:\-on\-sea)|southern (?:california|europe|lebanon|netherlands|ontario|rhodesia|)|south(?:ampton|sea)|southeastern europe|southwestern united states|soviet (?:east asia|far east|)|spanish (?:florida|morocco|)|spilsby|spithead|srb|sri lanka|srinagar|st\.petersburg|staden|stadskanaal|stalingrad|stalino|state duma|staten island|stavanger|stavropol|stendal|stettin|stirling|stockholm|strabo|strängnäs|strasbourg|stralsund|state of vietnam|strait|staraya russa|sturmabteilung|stuttgart|styria|subcontinent|sub\-saharan africa|suez|suffolk|sulawesi|sulu|sumatra|surabaya|surakarta|suriname|surrey|surya|susa|sutherland|suva|suzerainty|suzhou|svalbard|swabia|swahili coast|swaziland|swedish pomerania|swiss alps|sydney|syria \(roman province\)|syrmia|szczecin|szlachta|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(tacloban|taejon|taganrog|tagus|tahiti|tai\'an|taiga|taipei|taiwan|taji|tajikistan|takoradi|taktab|tal afar|talaku|talara|tallinn|tamaulipas|tambov|tamil nadu|tampa|tampico|tancos|tangier|tantamkweri|tanzania|taranto|tarki|tarnopol|tarragona|tartu|tashkent|tasiilaq|tasmania|taunton|taxila|tây ninh|tbilisi|tblisi|tebourba|tehran|tenerife|ternopil|territories of the united states|territory \(country subdivision\)|terschelling|texel|thame|the (?:bahamas|balkans|bronx|national map|philippines|)|th[e|é]rouanne|thessalonica|thessaly|thiaucourt|thuringia|tianjin|tiberias|tibet|ticino|tiflis|tikrit|tilsit|timor(?:\-leste)|tirana|tel aviv|tobago|tobolsk|tobruk|togo|tokyo|tomar|tonbridge|tonga|tonkin|torbay|torgau|toronto|torpoint|toruń|toul|toulon|tournai|tours|townsville|trabzon|transjordan|transkei|transnistria|transoxiana|trencin|trento|trieste|trinidad and tobago|tripoli|tripolitania|tromsø|trondheim|troon|troy|truk lagoon|trzebinia|tsentoroi|tsingtao|tucson|tufan|tugny|tulagi|tunis|tunbridge wells|tunisia|turin|turkestan|turkmenistan|turku|tuskany|tusov|tutuila|tuvalu|tuzla|tver|tynemouth|tyneside|tyre \(lebanon\)|tyrnyauz|tyrol \(state\)|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(tacloban|taejon|taganrog|tagus|tahiti|tai\'an|taiga|taipei|taiwan|taji|tajikistan|takoradi|taktab|tal afar|talaku|talara|tallinn|tamaulipas|tambov|tamil nadu|tampa|tampico|tancos|tangier|tantamkweri|tanzania|taranto|tarki|tarnopol|tarragona|tartu|tashkent|tasiilaq|tasmania|taunton|taxila|tây ninh|tbilisi|tblisi|tebourba|tehran|tenerife|ternopil|territories of the united states|territory \(country subdivision\)|terschelling|texel|thame|the (?:bahamas|balkans|bronx|national map|philippines|)|th[e|é]rouanne|thessalonica|thessaly|thiaucourt|thuringia|tianjin|tiberias|tibet|ticino|tiflis|tikrit|tilsit|timor(?:\-leste)|tirana|tel aviv|tobago|tobolsk|tobruk|togo|tokyo|tomar|tonbridge|tonga|tonkin|torbay|torgau|toronto|torpoint|toruń|toul|toulon|tournai|tours|townsville|trabzon|transjordan|transkei|transnistria|transoxiana|trencin|trento|trieste|trinidad and tobago|tripoli|tripolitania|tromsø|trondheim|troon|troy|truk lagoon|trzebinia|tsentoroi|tsingtao|tucson|tufan|tugny|tulagi|tunis|tunbridge wells|tunisia|turin|turkestan|turkmenistan|turku|tuskany|tusov|tutuila|tuvalu|tuzla|tver|tynemouth|tyneside|tyre \(lebanon\)|tyrnyauz|tyrol \(state\)|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(udine|ufa|ujjain|ukrainian ssr|ulm|ulster|uman|umayyad|unclaimed|united arab emirates|united states (?:east coast|virgin islands|west coast|)|unsan|upper (?:egypt|new york bay|new york harbor|silesia)|upstate new york|urals|uruguay|urus\-martan|uruzgan|urva|u\.s\.\-mexico border|ushant|ustka|utrecht \(province\)|uttar pradesh)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(udine|ufa|ujjain|ukrainian ssr|ulm|ulster|uman|umayyad|unclaimed|united arab emirates|united states (?:east coast|virgin islands|west coast|)|unsan|upper (?:egypt|new york bay|new york harbor|silesia)|upstate new york|urals|uruguay|urus\-martan|uruzgan|urva|u\.s\.\-mexico border|ushant|ustka|utrecht \(province\)|uttar pradesh|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(valencia|valenciennes|valladolid|valletta|valmiera|valpara[i|í]so|vancouver|vanuatu|varamin|vara[z|ž]din|varennes|varna|vatican city|vauban|vedeno|vella lavella|vend[e|é]e|vendér|veneto|venice|verona|vestfold|veszprém|vicenza|vichy|vidzeme|vienna|vienne|vientiane|vigo|villacoublay|village|vilnius|vinh|vinnitsa|vinnytsia|visayas|višegrad|vistula|vitebsk|vladimir|vlasenica|vlissingen|vlorë|vojvodina|volga|volgograd|volhynia|volkhov|volksdeutsche|voronezh|voroshilovgrad|vosges|vukovar|vũng tàu|vung tao|vyborg|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(valencia|valenciennes|valladolid|valletta|valmiera|valpara[i|í]so|vancouver|vanuatu|varamin|vara[z|ž]din|varennes|varna|vatican city|vauban|vedeno|vella lavella|vend[e|é]e|vendér|veneto|venice|verona|vestfold|veszprém|vicenza|vichy|vidzeme|vienna|vienne|vientiane|vigo|villacoublay|village|vilnius|vinh|vinnitsa|vinnytsia|visayas|višegrad|vistula|vitebsk|vladimir|vlasenica|vlissingen|vlorë|vojvodina|volga|volgograd|volhynia|volkhov|volksdeutsche|voronezh|voroshilovgrad|vosges|vukovar|vũng tàu|vung tao|vyborg|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(waifang|wakayama|wakde|walcheren|wallsend|wapping|warminster|warsash|waterford|wavre|waziristan|weimar|welbeck abbey|wiener neustadt|weinan|wellington|werl|wesel|weser|west (?:bengal|dunbartonshire|flanders|florida|francia|german|hartlepool|indies|java|pacific|pakistan|prussia|sussex|texas|)|westchester county|western (?:asia|cape|hemisphere|new york|pennsylvania|thrace|)|westphalia|westminster abbey|wetherby|wetzlar|wewak|whitby|whitehaven|wiesbaden|wilno|wincanton|winchester|winnipeg south‏|wismar|whitehall|white\'s ferry|woleai|woolwich|worcester(?:shire|)|worksop|wrocław|w[o|u]han|wu \(ten kingdoms\)|wuhu city)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(waifang|wakayama|wakde|walcheren|wallsend|wapping|warminster|warsash|waterford|wavre|waziristan|weimar|welbeck abbey|wiener neustadt|weinan|wellington|werl|wesel|weser|west (?:bengal|dunbartonshire|flanders|florida|francia|german|hartlepool|indies|java|pacific|pakistan|prussia|sussex|texas|)|westchester county|western (?:asia|cape|hemisphere|new york|pennsylvania|thrace|)|westphalia|westminster abbey|wetherby|wetzlar|wewak|whitby|whitehaven|wiesbaden|wilno|wincanton|winchester|winnipeg south|wismar|whitehall|white\'s ferry|woleai|woolwich|worcester(?:shire|)|worksop|wrocław|w[o|u]han|wu \(ten kingdoms\)|wuhu city)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(xiamen|xianyang|xiangyang|xingtai|xinjiang|xiongnu|Xuchang|xuchang|xuzhou|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(xiamen|xianyang|xiangyang|xingtai|xinjiang|xiongnu|Xuchang|xuchang|xuzhou|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(yad vashem|yangon|yangzhou|yangtze|yap|yaroslavl|yekaterinburg|yelnya|yerevan|yeysk|yogyakarta|yokohama|yokosuka|yonkers|yonne|yucat[á|a]n peninsula|yukon|yunnan|yusufiyah|yvelines|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(yad vashem|yangon|yangzhou|yangtze|yap|yaroslavl|yekaterinburg|yelnya|yerevan|yeysk|yogyakarta|yokohama|yokosuka|yonkers|yonne|yucat[á|a]n peninsula|yukon|yunnan|yusufiyah|yvelines|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(Żabbar|zadar|zagreb|zaire|zamboanga city|zamość|zanzibar|zaporizhia|zaporozhye|zaragoza|zaria|zeebrugge|zeeland|zemun|zhejiang|zhenjiang|zhengzhou|zhumadian|zhytomyr|zirndorf|ziten|zolochiv|zosimus|zulu kingdom|zurich|zürich|zweibrücken|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(Żabbar|zadar|zagreb|zaire|zamboanga city|zamość|zanzibar|zaporizhia|zaporozhye|zaragoza|zaria|zeebrugge|zeeland|zemun|zhejiang|zhenjiang|zhengzhou|zhumadian|zhytomyr|zirndorf|ziten|zolochiv|zosimus|zulu kingdom|zurich|zürich|zweibrücken|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(17th parallel north)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(17th parallel north)\]\]", "A7th parallel north"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})nd parallel north|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})nd parallel north|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})rd parallel north|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})rd parallel north|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})st parallel north|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})st parallel north|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})th parallel north)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})th parallel north)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})nd parallel north|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})nd parallel north|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})rd parallel north|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})rd parallel north|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})st parallel north|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})st parallel north|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})th parallel north)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})th parallel north)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})nd parallel north|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})nd parallel north|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})rd parallel north|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})rd parallel north|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})st parallel north|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})st parallel north|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})th parallel north)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})th parallel north)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})nd parallel south|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})nd parallel south|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})rd parallel south|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})rd parallel south|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})st parallel south|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})st parallel south|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})th parallel south)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})th parallel south)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})nd parallel south|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})nd parallel south|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})rd parallel south|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})rd parallel south|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})st parallel south|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})st parallel south|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})th parallel south)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})th parallel south)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})nd parallel south|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})nd parallel south|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})rd parallel south|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})rd parallel south|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})st parallel south|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})st parallel south|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})th parallel south)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})th parallel south)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(A7th parallel north)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(A7th parallel north)\]\]", "17th parallel north"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})nd meridian east|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})nd meridian east|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})rd meridian east|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})rd meridian east|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})st meridian east|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})st meridian east|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})th meridian east)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})th meridian east)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})nd meridian east|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})nd meridian east|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})rd meridian east|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})rd meridian east|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})st meridian east|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})st meridian east|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})th meridian east)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})th meridian east)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})nd meridian east|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})nd meridian east|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})rd meridian east|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})rd meridian east|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})st meridian east|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})st meridian east|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})th meridian east)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})th meridian east)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})nd meridian west|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})nd meridian west|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})rd meridian west|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})rd meridian west|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})st meridian west|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})st meridian west|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})th meridian west)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,1})th meridian west)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})nd meridian west|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})nd meridian west|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})rd meridian west|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})rd meridian west|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})st meridian west|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})st meridian west|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})th meridian west)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,2})th meridian west)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})nd meridian west|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})nd meridian west|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})rd meridian west|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})rd meridian west|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})st meridian west|)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})st meridian west|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})th meridian west)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((\d{1,3})th meridian west)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(bombay|brittany|dalmatia|hubei|java|la spezia|liberia|martinique|metz|mindanao|silesia|trier|w[u|ü]rttemberg|w[u|ü]rzburg|(?:xi|yan)\'an)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(bombay|brittany|dalmatia|hubei|java|la spezia|liberia|martinique|metz|mindanao|silesia|trier|w[u|ü]rttemberg|w[u|ü]rzburg|(?:xi|yan)\'an)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:aberdeen|ayr|bedford|berk|buckingham|cambridge|che|derby|east riding of york|hertford|gloucester|hamp|leicester|lincoln|new york|north york|northampton|nottingham|oxford|pembroke|perth|shrop|stafford|warwick|west york|wilt|york|)[ ]*shire)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:aberdeen|ayr|bedford|berk|buckingham|cambridge|che|derby|east riding of york|hertford|gloucester|hamp|leicester|lincoln|new york|north york|northampton|nottingham|oxford|pembroke|perth|shrop|stafford|warwick|west york|wilt|york|)[ ]*shire)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:asadabad|daman district)\, afghanistan)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:asadabad|daman district)\, afghanistan)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:belleau|estrées)\, aisne)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:belleau|estrées)\, aisne)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:birmingham|bridgeport|chickasaw|dauphin island|decatur|demopolis|foley|greensboro|huntsville|madison|marion|mobile|mobile bay|montgomery|silverhill|troy|tuscaloosa|tuscumbia|uniontown|), alabama)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:birmingham|bridgeport|chickasaw|dauphin island|decatur|demopolis|foley|greensboro|huntsville|madison|marion|mobile|mobile bay|montgomery|silverhill|troy|tuscaloosa|tuscumbia|uniontown|), alabama)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:anchorage|adak|bethel|cold bay|dutch harbor|fairbanks|juneau|kenai|ketchikan|kodiak|nome|petersburg|seward|sitka|valdez|), alaska)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:anchorage|adak|bethel|cold bay|dutch harbor|fairbanks|juneau|kenai|ketchikan|kodiak|nome|petersburg|seward|sitka|valdez|), alaska)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:banff|canmore|eaton|jasper|munson)\, alberta)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:banff|canmore|eaton|jasper|munson)\, alberta)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:constantine)\, algeria)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:constantine)\, algeria)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:buenos aires|córdoba|mendoza|moron|san luis)\, argentina)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:buenos aires|córdoba|mendoza|moron|san luis)\, argentina)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:fayetteville|gilbert|glendale|maricopa county|mesa|phoenix|prescott|scottsdale|sun city|tempe|tombstone|tucson|willcox|), arizona)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:fayetteville|gilbert|glendale|maricopa county|mesa|phoenix|prescott|scottsdale|sun city|tempe|tombstone|tucson|willcox|), arizona)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:camden|chalk bluff|fayetteville|helena|hot springs|jacksonport|little rock|morrilton|), arkansas)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:camden|chalk bluff|fayetteville|helena|hot springs|jacksonport|little rock|morrilton|), arkansas)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:yerevan)\, armenia)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:yerevan)\, armenia)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:brisbane|melbourne|new south wales|sydney|victoria|)\, australia)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:brisbane|melbourne|new south wales|sydney|victoria|)\, australia)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:berg|ebensee|imst)\, austria)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:berg|ebensee|imst)\, austria)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:nassau|)\, bahamas)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:nassau|)\, bahamas)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:manama|)\, bahrain)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:manama|)\, bahrain)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:wallerstein|)\, bavaria)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:wallerstein|)\, bavaria)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:brest|)\, belarus)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:brest|)\, belarus)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:nieuwpoort|waterloo|)\, belgium)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:nieuwpoort|waterloo|)\, belgium)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:esquimalt|vancouver|victoria|)\, british columbia)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:esquimalt|vancouver|victoria|)\, british columbia)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:reading|wellington|wellington college|windsor|)\, berkshire)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:reading|wellington|wellington college|windsor|)\, berkshire)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:riverdale|)\, bronx)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:riverdale|)\, bronx)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:el palomar|)\, buenos aires)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:el palomar|)\, buenos aires)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alameda|anaheim|atwater|bakersfield|barstow|benicia|berkeley|beverly hills|bodega bay|burbank|colma|coronado|el centro|eureka|fairfield|fallbrook|fresno|hawthorne|hayward|hollywood\, los angeles|huntington beach|imperial beach|irvine|la jolla|lemoore|lompoc|long beach|los (?:alamitos|angeles)|mare island|martinez|marysville|modesto|mojave|monterey|mountain view|napa|oakland|oceanside|ontario|orlando|oroville|palm(?:dale| springs|)|palo alto|pasadena|pebble beach|petaluma|pittsburg|point loma|point loma\, san diego|ramona|redding|richmond|riverside|sacramento|salinas|santa (?:ana|barbara|clarita|maria|monica|rosa|)|sausalito|seaside|sonoma|stockton|sunnyvale|tustin|twentynine palms|unionville|vallejo|visalia|wilmington(?:\, los angeles)|yountville|), california)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alameda|anaheim|atwater|bakersfield|barstow|benicia|berkeley|beverly hills|bodega bay|burbank|colma|coronado|el centro|eureka|fairfield|fallbrook|fresno|hawthorne|hayward|hollywood\, los angeles|huntington beach|imperial beach|irvine|la jolla|lemoore|lompoc|long beach|los (?:alamitos|angeles)|mare island|martinez|marysville|modesto|mojave|monterey|mountain view|napa|oakland|oceanside|ontario|orlando|oroville|palm(?:dale| springs|)|palo alto|pasadena|pebble beach|petaluma|pittsburg|point loma|point loma\, san diego|ramona|redding|richmond|riverside|sacramento|salinas|santa (?:ana|barbara|clarita|maria|monica|rosa|)|sausalito|seaside|sonoma|stockton|sunnyvale|tustin|twentynine palms|unionville|vallejo|visalia|wilmington(?:\, los angeles)|yountville|), california)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(san (?:antonio|bernardino|bruno|carlos|diego|francisco|francisco bay area|jose|leandro|long beach|marcos|mateo|pedro|signal hill|vallejo|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(san (?:antonio|bernardino|bruno|carlos|diego|francisco|francisco bay area|jose|leandro|long beach|marcos|mateo|pedro|signal hill|vallejo|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(san (?:bernardino|bruno|carlos|chico|diego|diego county|dixon|el monte|fairfield|francisco|jose|leandro|long beach|luis obispo|malibu|marcos|marysville|mateo|pedro|signal hill|suisun bay|vallejo|)\, california)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(san (?:bernardino|bruno|carlos|chico|diego|diego county|dixon|el monte|fairfield|francisco|jose|leandro|long beach|luis obispo|malibu|marcos|marysville|mateo|pedro|signal hill|suisun bay|vallejo|)\, california)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(san (?:pedro\, los angeles|)\, california)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(san (?:pedro\, los angeles|)\, california)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(mountain view cemetery \(oakland\, california\))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(mountain view cemetery \(oakland\, california\))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:falaise|)\, calvados)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:falaise|)\, calvados)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:fishhook|)\, cambodia)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:fishhook|)\, cambodia)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ontario|quebec|)\, canada)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ontario|quebec|)\, canada)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:são vicente|)\, cape verde)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:são vicente|)\, cape verde)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bellefontaine|green\-wood|hollywood forever|loudon park|) cemetery)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bellefontaine|green\-wood|hollywood forever|loudon park|) cemetery)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:rochefort|)\, charente\-maritime)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:rochefort|)\, charente\-maritime)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:santiago|)\, chile)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:santiago|)\, chile)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:peking|ye|)\, china)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:peking|ye|)\, china)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:cartagena|)\, colombia)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:cartagena|)\, colombia)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:aurora|boulder|colorado springs|denver|el paso county|leadville|parker|pueblo|), colorado)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:aurora|boulder|colorado springs|denver|el paso county|leadville|parker|pueblo|), colorado)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ansonia|bedford|branford|bridgeport|danbury|fairfield|greenwich|groton|hartford|milford|mystic|new canaan|new haven|new london|norwalk|norwich|plainville|portland|stamford|west haven|westport|windsor locks|), connecticut)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ansonia|bedford|branford|bridgeport|danbury|fairfield|greenwich|groton|hartford|milford|mystic|new canaan|new haven|new london|norwalk|norwich|plainville|portland|stamford|west haven|westport|windsor locks|), connecticut)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:falmouth|)\, cornwall)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:falmouth|)\, cornwall)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:arlington|jiangling|prince george\'s|) county)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:arlington|jiangling|prince george\'s|) county)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:split|)\, croatia)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:split|)\, croatia)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:carlisle|)\, cumbria)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:carlisle|)\, cumbria)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:cardenas|guantánamo bay|havana|santiago|trinidad|)\, cuba)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:cardenas|guantánamo bay|havana|santiago|trinidad|)\, cuba)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:harrington|lewes|wilmington|), delaware)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:harrington|lewes|wilmington|), delaware)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:copenhagen|), denmark)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:copenhagen|), denmark)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:dartmouth|devonport|tiverton|topsham|)\, devon)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:dartmouth|devonport|tiverton|topsham|)\, devon)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:dầu tiếng|hank[o|ou]|lüshunkou|mubende|nazranovsky|vedensky|wanzhou|) district)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:dầu tiếng|hank[o|ou]|lüshunkou|mubende|nazranovsky|vedensky|wanzhou|) district)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:weymouth|)\, dorset)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:weymouth|)\, dorset)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:batavia|)\, dutch east indies)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:batavia|)\, dutch east indies)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:eastern han|han|jin|joseon|later liang|ming|ottoman|qin|qing|shang|song|sui|tang|western xia|xia|yuan|zhou|) dynasty)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:eastern han|han|jin|joseon|later liang|ming|ottoman|qin|qing|shang|song|sui|tang|western xia|xia|yuan|zhou|) dynasty)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:haddington|)\, east lothian)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:haddington|)\, east lothian)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:newhaven|)\, east sussex)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:newhaven|)\, east sussex)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:salinas|)\, ecuador)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:salinas|)\, ecuador)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alexandria|cairo|)\, egypt)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alexandria|cairo|)\, egypt)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:cambridgeshire|hampshire|lincoln|liverpool|london|plymouth|portsmouth|)\, england)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:cambridgeshire|hampshire|lincoln|liverpool|london|plymouth|portsmouth|)\, england)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:boca raton|clearwater (?: beach)|coral gables|delray beach|fort lauderdale|gainesville|green cove springs|hollywood|jacksonville|jupiter|key largo|key west|mayport|miami|milton|orlando|palm beach|panama city|pensacola|polk city|santa rosa county|st\. marks|st\. petersburg|tallahassee|tampa|titusville|valparaiso|warrington|west palm beach|), florida)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:boca raton|clearwater (?: beach)|coral gables|delray beach|fort lauderdale|gainesville|green cove springs|hollywood|jacksonville|jupiter|key largo|key west|mayport|miami|milton|orlando|palm beach|panama city|pensacola|polk city|santa rosa county|st\. marks|st\. petersburg|tallahassee|tampa|titusville|valparaiso|warrington|west palm beach|), florida)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:brest|cannes|dijon|dunkirk|lyon|nancy|paris|rouen|toulon|)\, france)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:brest|cannes|dijon|dunkirk|lyon|nancy|paris|rouen|toulon|)\, france)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:communes|departments|regions|) of france)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:communes|departments|regions|) of france)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:albany|athens|atlanta|augusta|columbus|dahlonega|dalton|darien|gori|jonesboro|kings bay|lafayette|macon|marietta|milledgeville|resaca|savannah|trenton|tybee island|voldosta|warm springs|), georgia)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:albany|athens|atlanta|augusta|columbus|dahlonega|dalton|darien|gori|jonesboro|kings bay|lafayette|macon|marietta|milledgeville|resaca|savannah|trenton|tybee island|voldosta|warm springs|), georgia)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:cologne|frankfurt|haren|mannheim|worms|)\, germany)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:cologne|frankfurt|haren|mannheim|worms|)\, germany)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:rhodes|souda|thebes|)\, greece)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:rhodes|souda|thebes|)\, greece)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:cape farewell|)\, greenland)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:cape farewell|)\, greenland)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:apra|)\, guam)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:apra|)\, guam)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:georgetown|)\, guyana)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:georgetown|)\, guyana)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:andover|farnborough|northam|woolston|)\, hampshire)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:andover|farnborough|northam|woolston|)\, hampshire)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:honolulu|maui|oahu|pearl harbor|waipahu|), hawaii)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:honolulu|maui|oahu|pearl harbor|waipahu|), hawaii)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:boise|lewiston|moscow|mountain home|st\. maries|), idaho)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:boise|lewiston|moscow|mountain home|st\. maries|), idaho)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alton|anna|bloomington|bolingbrook|cairo|carlyle|carrollton|chicago|decatur|dekalb|forest park|great lakes|joliet|lake forrest|mound city|north chicago|oak park|quincy|rantoul|rockford|springfield|sugar grove|wheaton|), illinois)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alton|anna|bloomington|bolingbrook|cairo|carlyle|carrollton|chicago|decatur|dekalb|forest park|great lakes|joliet|lake forrest|mound city|north chicago|oak park|quincy|rantoul|rockford|springfield|sugar grove|wheaton|), illinois)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alang|hyderabad|)\, india)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alang|hyderabad|)\, india)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:crane|evansville|gary|indianapolis|jeffersonville|lovett|madison|muncie|new albany|peru|south bend|vincennes|), indiana)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:crane|evansville|gary|indianapolis|jeffersonville|lovett|madison|muncie|new albany|peru|south bend|vincennes|), indiana)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:sabang|)\, indonesia)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:sabang|)\, indonesia)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:cedar rapids|clarinda|cresco|davenport|des moines|dubuque|hampton|iowa city|marshalltown|mason city|oskaloosa|ottumwa|portsmouth|sioux city|), iowa)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:cedar rapids|clarinda|cresco|davenport|des moines|dubuque|hampton|iowa city|marshalltown|mason city|oskaloosa|ottumwa|portsmouth|sioux city|), iowa)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:baghdad|baiji|karma|ramadi|), iraq)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:baghdad|baiji|karma|ramadi|), iraq)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:belfast|county tyrone|queenstown|)\, ireland)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:belfast|county tyrone|queenstown|)\, ireland)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:douglas|)\, isle of man)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:douglas|)\, isle of man)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:acre|haifa|yated|)\, israel)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:acre|haifa|yated|)\, israel)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:rome|sanremo|syracuse)\, italy)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:rome|sanremo|syracuse)\, italy)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:kingston|)\, jamaica)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:kingston|)\, jamaica)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:hiroshima|iwakuni|nagasaki|okinawa|sapporo|sasebo|tokyo|yokosuka|)\, japan)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:hiroshima|iwakuni|nagasaki|okinawa|sapporo|sasebo|tokyo|yokosuka|)\, japan)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:kamakura|)\, kanagawa)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:kamakura|)\, kanagawa)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:abilene|atchison|chapman|emporia|great bend|junction city|kansas city|lawrence|leavenworth|liberal|olathe|overland park|topeka|wichita|), kansas)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:abilene|atchison|chapman|emporia|great bend|junction city|kansas city|lawrence|leavenworth|liberal|olathe|overland park|topeka|wichita|), kansas)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ashford|chatham|deal|gravesend|rochester|)\, kent)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ashford|chatham|deal|gravesend|rochester|)\, kent)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ashville|columbus|covington|danville|frankfort|lexington|louisville|murray|newport|paducah|richmond|southgate|), kentucky)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ashville|columbus|covington|danville|frankfort|lexington|louisville|murray|newport|paducah|richmond|southgate|), kentucky)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:nairobi|)\, kenya)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:nairobi|)\, kenya)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:inchon|)\, korea)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:inchon|)\, korea)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:preston|)\, lancashire)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:preston|)\, lancashire)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:beirut|tripoli|tyre|)\, lebanon)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:beirut|tripoli|tyre|)\, lebanon)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:woodhouse|)\, leicestershire)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:woodhouse|)\, leicestershire)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bayda|bomba|cyrene|derna|jaghbub|khoms|)\, libya)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bayda|bomba|cyrene|derna|jaghbub|khoms|)\, libya)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:digby|lincoln|)\, lincolnshire)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:digby|lincoln|)\, lincolnshire)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:blackwall|chelsea|ham|hyde park|northwood|)\, london)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:blackwall|chelsea|ham|hyde park|northwood|)\, london)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alexandria|algiers|baton rouge|chalmette|kenner|lafayette|lockport|minden|monroe|new orleans|pineville|ruston|shreveport|westwego|), louisiana)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alexandria|algiers|baton rouge|chalmette|kenner|lafayette|lockport|minden|monroe|new orleans|pineville|ruston|shreveport|westwego|), louisiana)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alexandria|algiers|baton rouge|chalmette|kenner|lafayette|lockport|minden|monroe|new orleans|pineville|ruston|shreveport|westwego|) la)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alexandria|algiers|baton rouge|chalmette|kenner|lafayette|lockport|minden|monroe|new orleans|pineville|ruston|shreveport|westwego|) la)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:auburn|augusta|bangor|bath|belfast|biddeford|blue hill|boothbay|bristol|casco bay|castine|dexter|dresden|eastport|friendship|greene|gorham|gosport|kittery(?: point|)|leeds|lewiston|limestone|machias|portland|rockland|rumford|thomaston|topsham|waterford|), maine)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:auburn|augusta|bangor|bath|belfast|biddeford|blue hill|boothbay|bristol|casco bay|castine|dexter|dresden|eastport|friendship|greene|gorham|gosport|kittery(?: point|)|leeds|lewiston|limestone|machias|portland|rockland|rumford|thomaston|topsham|waterford|), maine)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:kuala lumpur|)\, malaysia)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:kuala lumpur|)\, malaysia)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:salina|)\, malta)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:salina|)\, malta)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ambon|)\, maluku)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ambon|)\, maluku)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:winnipeg|)\, manitoba)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:winnipeg|)\, manitoba)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:aberdeen|annapolis|baltimore|bethesda|chevy chase|columbia|cumberland|easton|emmitsburg|fairfield|frederick|gaithersburg|georgetown|germantown|hagerstown|hyattstown|lanham|laurel|lexington park|middle river|oakland|ocean city|patuxent river|perryville|piney point|rockville|salisury|sharpsburg|silver spring|sparrows point|suitland|urbana|waldorf), maryland)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:aberdeen|annapolis|baltimore|bethesda|chevy chase|columbia|cumberland|easton|emmitsburg|fairfield|frederick|gaithersburg|georgetown|germantown|hagerstown|hyattstown|lanham|laurel|lexington park|middle river|oakland|ocean city|patuxent river|perryville|piney point|rockville|salisury|sharpsburg|silver spring|sparrows point|suitland|urbana|waldorf), maryland)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:aberdeen|annapolis|baltimore|bethesda|chevy chase|columbia|cumberland|easton|emmitsburg|fairfield|frederick|gaithersburg|georgetown|germantown|hagerstown|hyattstown|lanham|laurel|lexington park|middle river|oakland|ocean city|patuxent river|perryville|piney point|rockville|salisury|sharpsburg|silver spring|sparrows point|suitland|urbana|waldorf), md)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:aberdeen|annapolis|baltimore|bethesda|chevy chase|columbia|cumberland|easton|emmitsburg|fairfield|frederick|gaithersburg|georgetown|germantown|hagerstown|hyattstown|lanham|laurel|lexington park|middle river|oakland|ocean city|patuxent river|perryville|piney point|rockville|salisury|sharpsburg|silver spring|sparrows point|suitland|urbana|waldorf), md)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:abington|andover|barnstable|bedford|beverly|boston|bourne|brookline|burlington|cambridge|cape cod|charlestown|chatham|chelsea|concord|dartmouth|deerfield|dorchester|duxbury|everett|fall river|gloucester|haverhill|hingham|hull|quincy|lexington|lowell|lynn|marshfield|milton|nahant|nantucket|needham|neponset|new bedford|newburyport|northampton|orleans|pittsfield|provincetown|raynham|reading|salisbury|somerville|squantum|springfield|stow|taunton|truro|wellfleet|west roxbury|weymouth|winchester|woods hole|worcester|), massachusetts)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:abington|andover|barnstable|bedford|beverly|boston|bourne|brookline|burlington|cambridge|cape cod|charlestown|chatham|chelsea|concord|dartmouth|deerfield|dorchester|duxbury|everett|fall river|gloucester|haverhill|hingham|hull|quincy|lexington|lowell|lynn|marshfield|milton|nahant|nantucket|needham|neponset|new bedford|newburyport|northampton|orleans|pittsfield|provincetown|raynham|reading|salisbury|somerville|squantum|springfield|stow|taunton|truro|wellfleet|west roxbury|weymouth|winchester|woods hole|worcester|), massachusetts)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:abington|andover|barnstable|bedford|beverly|boston|bourne|brookline|burlington|cambridge|cape cod|charlestown|chatham|chelsea|concord|dartmouth|deerfield|dorchester|duxbury|everett|fall river|gloucester|haverhill|hingham|hull|quincy|lexington|lowell|lynn|marshfield|milton|nahant|nantucket|needham|neponset|new bedford|newburyport|northampton|orleans|pittsfield|provincetown|raynham|reading|salisbury|somerville|squantum|springfield|stow|taunton|truro|wellfleet|west roxbury|weymouth|winchester|woods hole|worcester|), ma\.)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:abington|andover|barnstable|bedford|beverly|boston|bourne|brookline|burlington|cambridge|cape cod|charlestown|chatham|chelsea|concord|dartmouth|deerfield|dorchester|duxbury|everett|fall river|gloucester|haverhill|hingham|hull|quincy|lexington|lowell|lynn|marshfield|milton|nahant|nantucket|needham|neponset|new bedford|newburyport|northampton|orleans|pittsfield|provincetown|raynham|reading|salisbury|somerville|squantum|springfield|stow|taunton|truro|wellfleet|west roxbury|weymouth|winchester|woods hole|worcester|), ma\.)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:brompton|gillingham|)\, medway)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:brompton|gillingham|)\, medway)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:al\-jazira|edessa|)\, mesopotamia)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:al\-jazira|edessa|)\, mesopotamia)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:baccarat|)\, meurthe\-et\-moselle)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:baccarat|)\, meurthe\-et\-moselle)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:acapulco|mexico city|)\, mexico)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:acapulco|mexico city|)\, mexico)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:albion|alma|ann arbor|augusta|bay city|belleville|canton|cedarville|charlevoix|cheboygan|clinton|coldwater|dearborn|delray|detroit|east saginaw|flint|grand (?:haven|rapids)|harbor beach|ionia|kalamazoo|lansing|manistee|marquette|marshal|metz township|newport|niles|onaway|port huron|posen|rogers city|st\. ignace|sterling heights|troy|warren|wyandotte|), michigan)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:albion|alma|ann arbor|augusta|bay city|belleville|canton|cedarville|charlevoix|cheboygan|clinton|coldwater|dearborn|delray|detroit|east saginaw|flint|grand (?:haven|rapids)|harbor beach|ionia|kalamazoo|lansing|manistee|marquette|marshal|metz township|newport|niles|onaway|port huron|posen|rogers city|st\. ignace|sterling heights|troy|warren|wyandotte|), michigan)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:duluth|minneapolis|northfield|rochester|saint paul|savage|st\. paul|), minnesota)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:duluth|minneapolis|northfield|rochester|saint paul|savage|st\. paul|), minnesota)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:abbeville|aberdeen|biloxi|booneville|brandon|canton|columbus|corinth|eastport|greenville|grenada|gulfport|hattiesburg|holly springs|iuka|jackson|meridian|methuen|natchez|okolona|oxford|pascagoula|pontotoc|ripley|southaven|tupelo|vicksburg|yazoo city|), mississippi)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:abbeville|aberdeen|biloxi|booneville|brandon|canton|columbus|corinth|eastport|greenville|grenada|gulfport|hattiesburg|holly springs|iuka|jackson|meridian|methuen|natchez|okolona|oxford|pascagoula|pontotoc|ripley|southaven|tupelo|vicksburg|yazoo city|), mississippi)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:belton|boonville|cape girardeau|carondelet|columbia|fayette|florida|fredericktown|fulton|glasgow|grandview|hannibal|independence|ironton|jefferson city|joplin|kansas city|ladue|lexington|maryville|new madrid|pilot knob|raymore|sedalia|springfield|st\. charles|st\. louis|), missouri)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:belton|boonville|cape girardeau|carondelet|columbia|fayette|florida|fredericktown|fulton|glasgow|grandview|hannibal|independence|ironton|jefferson city|joplin|kansas city|ladue|lexington|maryville|new madrid|pilot knob|raymore|sedalia|springfield|st\. charles|st\. louis|), missouri)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:belton|boonville|cape girardeau|carondelet|columbia|fayette|florida|fredericktown|fulton|glasgow|grandview|hannibal|independence|ironton|jefferson city|joplin|kansas city|ladue|lexington|maryville|new madrid|pilot knob|raymore|sedalia|springfield|st\. charles|st\. louis|), mo\.)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:belton|boonville|cape girardeau|carondelet|columbia|fayette|florida|fredericktown|fulton|glasgow|grandview|hannibal|independence|ironton|jefferson city|joplin|kansas city|ladue|lexington|maryville|new madrid|pilot knob|raymore|sedalia|springfield|st\. charles|st\. louis|), mo\.)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:billings|bozeman|broadus|butte|great falls|havre|helena|kalispell|missoula|), montana)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:billings|bozeman|broadus|butte|great falls|havre|helena|kalispell|missoula|), montana)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:safi|)\, morocco)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:safi|)\, morocco)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:nagasaki|sasebo|)\, nagasaki)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:nagasaki|sasebo|)\, nagasaki)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alliance|bayard|beatrice|bellevue|blair|columbus|crete|elkhorn|fremont|friend|gering|grand island|harrison|harvard|hastings|kearney|la vista|lexington|lincoln|livingston|mccook|nebraska city|norfolk|north platt|omaha|papillion|platt|ponca|ralston|sidney|scottsbluff|south sioux city|valentine|wayne|york|), nebraska)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alliance|bayard|beatrice|bellevue|blair|columbus|crete|elkhorn|fremont|friend|gering|grand island|harrison|harvard|hastings|kearney|la vista|lexington|lincoln|livingston|mccook|nebraska city|norfolk|north platt|omaha|papillion|platt|ponca|ralston|sidney|scottsbluff|south sioux city|valentine|wayne|york|), nebraska)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:gagetown|fredericton|miramichi|saint john|)\, new brunswick)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:gagetown|fredericton|miramichi|saint john|)\, new brunswick)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:derry|dover|durham|exeter|hooksett|keene|londonderry|peterborough|portsmouth|rye|windham|woolston|), new hampshire)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:derry|dover|durham|exeter|hooksett|keene|londonderry|peterborough|portsmouth|rye|windham|woolston|), new hampshire)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bayonne|bordentown|camden|cape may|dover|elizabeth|glen ridge|hackensack|hoboken|irvington|jersey city|kearny|kearney|lakehurst|medford|millville|new brunswick|newark|north bergen|orange|passaic|plainfield|princeton|red bank|river vale|sandy hook|summit|totowa|trenton|), new jersey)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bayonne|bordentown|camden|cape may|dover|elizabeth|glen ridge|hackensack|hoboken|irvington|jersey city|kearny|kearney|lakehurst|medford|millville|new brunswick|newark|north bergen|orange|passaic|plainfield|princeton|red bank|river vale|sandy hook|summit|totowa|trenton|), new jersey)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bayonne|bordentown|camden|cape may|dover|elizabeth|glen ridge|hackensack|hoboken|irvington|jersey city|kearny|kearney|lakehurst|medford|millville|new brunswick|newark|north bergen|orange|passaic|plainfield|princeton|red bank|river vale|sandy hook|summit|totowa|trenton|), n\.j\.)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bayonne|bordentown|camden|cape may|dover|elizabeth|glen ridge|hackensack|hoboken|irvington|jersey city|kearny|kearney|lakehurst|medford|millville|new brunswick|newark|north bergen|orange|passaic|plainfield|princeton|red bank|river vale|sandy hook|summit|totowa|trenton|), n\.j\.)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alamogordo|albuquerque|carlsbad|clovis|deming|las cruces|los alamos|los vegas|roswell|santa fe|taos|woolston|), new mexico)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alamogordo|albuquerque|carlsbad|clovis|deming|las cruces|los alamos|los vegas|roswell|santa fe|taos|woolston|), new mexico)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ingleburn|newcastle|nowra|sydney|)\, new south wales)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ingleburn|newcastle|nowra|sydney|)\, new south wales)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:albany|amherst|binghampton|bronx|brookhaven|brooklyn|brownville|buffalo|burlington|calverton|clay|cold spring|conklin|cooperstown|farmingdale|flushing|garden city|garrison|german flatts|glans falls|glenville|hempstead|highland falls|hudson|huntington|hyde park|jamaica|kingston|kings point|lake placid|long beach|long island(?:city|)|loudonville|manhatten|montauk|new york(?: city|)|niagara falls|ogdensburg|oswego|oyster bay|patchogue|poughkeepsie \(city\)|queens|ripley|rochester|salem|saranac lake|saratoga(?: springs|)|schenectady|scott|smithtown|staten island|syracuse|troy|westernville|white plains|whitesboro|yonkers|), new york)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:albany|amherst|binghampton|bronx|brookhaven|brooklyn|brownville|buffalo|burlington|calverton|clay|cold spring|conklin|cooperstown|farmingdale|flushing|garden city|garrison|german flatts|glans falls|glenville|hempstead|highland falls|hudson|huntington|hyde park|jamaica|kingston|kings point|lake placid|long beach|long island(?:city|)|loudonville|manhatten|montauk|new york(?: city|)|niagara falls|ogdensburg|oswego|oyster bay|patchogue|poughkeepsie \(city\)|queens|ripley|rochester|salem|saranac lake|saratoga(?: springs|)|schenectady|scott|smithtown|staten island|syracuse|troy|westernville|white plains|whitesboro|yonkers|), new york)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[new york\|new york city\]\]", "New York City"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:auckland|christchurch|wellington|)\, new zealand)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:auckland|christchurch|wellington|)\, new zealand)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:argentia|st\. john\'s|)\, newfoundland)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:argentia|st\. john\'s|)\, newfoundland)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:argentia|st\. john\'s|)\, newfoundland and labrador)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:argentia|st\. john\'s|)\, newfoundland and labrador)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:flushing|)\, netherlands)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:flushing|)\, netherlands)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:austin|carson city|fallon|las vegas|reno|), nevada)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:austin|carson city|fallon|las vegas|reno|), nevada)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:jaji|), nigeria)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:jaji|), nigeria)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:niigata|), niigata)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:niigata|), niigata)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:asheville|beaufort|chapel hill|charlotte|cherry point|davis|durham|elizabeth city|goldsboro|greenville|havelock|hendersonville|holly ridge|jacksonville|jefferson|kinston|kitty hawk|longbeach|madison|morehead city|new bern|ocracoke|plymouth|raleigh|salisbury|tarboro|wilmington|), north carolina)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:asheville|beaufort|chapel hill|charlotte|cherry point|davis|durham|elizabeth city|goldsboro|greenville|havelock|hendersonville|holly ridge|jacksonville|jefferson|kinston|kitty hawk|longbeach|madison|morehead city|new bern|ocracoke|plymouth|raleigh|salisbury|tarboro|wilmington|), north carolina)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bismarck|fargo|minot|), north dakota)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bismarck|fargo|minot|), north dakota)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:scarborough|)\, north yorkshire)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:scarborough|)\, north yorkshire)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bergen|mandal|oslo|)\, norway)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bergen|mandal|oslo|)\, norway)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:beeston|)\, nottinghamshire)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:beeston|)\, nottinghamshire)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:amherst|annapolis royal|blockhouse|canso|chester|dartmouth|digby|halifax|liverpool|lunenburg|shelburne|sydney|weymouth|windsor|yarmouth|)\, nova scotia)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:amherst|annapolis royal|blockhouse|canso|chester|dartmouth|digby|halifax|liverpool|lunenburg|shelburne|sydney|weymouth|windsor|yarmouth|)\, nova scotia)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:arkhangelsk|dnipropetrovsk|murmansk|novgorod|pskov|)\, oblast)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:arkhangelsk|dnipropetrovsk|murmansk|novgorod|pskov|)\, oblast)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:arkhangelsk|dnipropetrovsk|murmansk|novgorod|pskov|) oblast)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:arkhangelsk|dnipropetrovsk|murmansk|novgorod|pskov|) oblast)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:akron|alliance|berea|canfield|canton|cincinnati|cleveland|columbus|dayton|delaware|gambier|greenville|hubbard|lakewood|lancaster|leyden|lorain|louisville|marion|marietta|oxford|painesville|parma|ravenna|rocky river|salem|steubenville|toledo|troy|warren|wilmington|windham|youngstown|), ohio)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:akron|alliance|berea|canfield|canton|cincinnati|cleveland|columbus|dayton|delaware|gambier|greenville|hubbard|lakewood|lancaster|leyden|lorain|louisville|marion|marietta|oxford|painesville|parma|ravenna|rocky river|salem|steubenville|toledo|troy|warren|wilmington|windham|youngstown|), ohio)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:chatan|ginowan|kadena|kin|naha|uruma|)\, okinawa)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:chatan|ginowan|kadena|kin|naha|uruma|)\, okinawa)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bartlesville|edmond|lawton|lone wolf|oklahoma city|perry|ryan|shawnee|stillwater|tulsa|), oklahoma)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bartlesville|edmond|lawton|lone wolf|oklahoma city|perry|ryan|shawnee|stillwater|tulsa|), oklahoma)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:muscat|)\, oman)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:muscat|)\, oman)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:barrie|borden|chatham|dunnville|hamilton|keswick|kingston|london|north bay|ottawa|pembroke|perth|petawawa|prescott|simcoe county|toronto|trenton|windsor|)\, ontario)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:barrie|borden|chatham|dunnville|hamilton|keswick|kingston|london|north bay|ottawa|pembroke|perth|petawawa|prescott|simcoe county|toronto|trenton|windsor|)\, ontario)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:astoria|coos bay|eugene|mcminnville|medford|ontario|pendleton|portland|tillamook|umatilla|), oregon)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:astoria|coos bay|eugene|mcminnville|medford|ontario|pendleton|portland|tillamook|umatilla|), oregon)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:christ church|marston|merton college|)\, oxford)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:christ church|marston|merton college|)\, oxford)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:abingdon|gosford|newbridge|wallingford|woodstock|)\, oxfordshire)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:abingdon|gosford|newbridge|wallingford|woodstock|)\, oxfordshire)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:punjab|)\, pakistan)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:punjab|)\, pakistan)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:balboa|colón|)\, panama)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:balboa|colón|)\, panama)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:buin|buna|)\, papua new guinea)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:buin|buna|)\, papua new guinea)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:allentown|ambridge|ardmore|bedford|bethlehem|blairsville|brownsville|butler|carlisle|chambersburg|chester|clairton|coraopolis|devon|dover|erie|fairfield|gettysburg|gladwyne|hanover|harrisburg|horsham|johnstown|kingston|lancaster|malvern|mechanicsburg|milton|oil city|philadelphia|pittsburgh|pottsville|reading|shanksville|washington|wayne|waynesburg|wernersville|williamsport|), pennsylvania)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:allentown|ambridge|ardmore|bedford|bethlehem|blairsville|brownsville|butler|carlisle|chambersburg|chester|clairton|coraopolis|devon|dover|erie|fairfield|gettysburg|gladwyne|hanover|harrisburg|horsham|johnstown|kingston|lancaster|malvern|mechanicsburg|milton|oil city|philadelphia|pittsburgh|pottsville|reading|shanksville|washington|wayne|waynesburg|wernersville|williamsport|), pennsylvania)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:allentown|ambridge|ardmore|bedford|bethlehem|blairsville|brownsville|butler|carlisle|chambersburg|chester|clairton|coraopolis|devon|dover|erie|fairfield|gettysburg|gladwyne|hanover|harrisburg|horsham|johnstown|kingston|lancaster|malvern|mechanicsburg|milton|oil city|philadelphia|pittsburgh|pottsville|reading|shanksville|washington|wayne|waynesburg|wernersville|williamsport|), pa)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:allentown|ambridge|ardmore|bedford|bethlehem|blairsville|brownsville|butler|carlisle|chambersburg|chester|clairton|coraopolis|devon|dover|erie|fairfield|gettysburg|gladwyne|hanover|harrisburg|horsham|johnstown|kingston|lancaster|malvern|mechanicsburg|milton|oil city|philadelphia|pittsburgh|pottsville|reading|shanksville|washington|wayne|waynesburg|wernersville|williamsport|), pa)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:allentown|ambridge|ardmore|bedford|bethlehem|blairsville|brownsville|butler|carlisle|chambersburg|chester|clairton|coraopolis|devon|dover|erie|fairfield|gettysburg|gladwyne|hanover|harrisburg|horsham|johnstown|kingston|lancaster|malvern|mechanicsburg|milton|oil city|philadelphia|pittsburgh|pottsville|reading|shanksville|washington|wayne|waynesburg|wernersville|williamsport|), pa\.)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:allentown|ambridge|ardmore|bedford|bethlehem|blairsville|brownsville|butler|carlisle|chambersburg|chester|clairton|coraopolis|devon|dover|erie|fairfield|gettysburg|gladwyne|hanover|harrisburg|horsham|johnstown|kingston|lancaster|malvern|mechanicsburg|milton|oil city|philadelphia|pittsburgh|pottsville|reading|shanksville|washington|wayne|waynesburg|wernersville|williamsport|), pa\.)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ban karai|m[u|ụ] gi[a|ạ]) pass|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ban karai|m[u|ụ] gi[a|ạ]) pass|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:arabia|arabian|bataan|cotentin|crimean|iberian|kamchatka|kerch|kola|korean|malay|sinai|taman|virginia|) peninsula)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:arabia|arabian|bataan|cotentin|crimean|iberian|kamchatka|kerch|kola|korean|malay|sinai|taman|virginia|) peninsula)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:lisbon|montijo|)\, portugal)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:lisbon|montijo|)\, portugal)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:babil|b[a|ắ]c giang|baghlan|bi[e|ê]n h[o|ò]a|bình Định|binh dinh|b[i|ì]nh d[u|ư]ơng|bình long|bolikhamsai|buenos aires|Đắk lắk|dinh tuong|diyala|fars|h[a|à] t[i|ĩ]nh|helmand|herat|houaphanh|kabul|kandahar|kapisa|khost|kon tum|logar|nuristan|owari|qu[a|ả]ng (?:b[i|ì]nh|nam|ng[a|ã]i|t[i|í]n|tri|)|qalat\, zabul\,|rhine|roman|shaanxi|shinano|sơn la|t[a|â]y ninh|thái nguyên|thanh hóa|thừa thiên|wardak|yên bái|zabul|) province)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:babil|b[a|ắ]c giang|baghlan|bi[e|ê]n h[o|ò]a|binh Định|binh dinh|b[i|ì]nh d[u|ư]ơng|bình long|bolikhamsai|buenos aires|Đắk lắk|dinh tuong|diyala|fars|h[a|à] t[i|ĩ]nh|helmand|herat|houaphanh|kabul|kandahar|kapisa|khost|kon tum|logar|nuristan|owari|qu[a|ả]ng (?:b[i|ì]nh|nam|ng[a|ã]i|t[i|í]n|tri|)|qalat\, zabul\,|rhine|roman|shaanxi|shinano|sơn la|t[a|â]y ninh|thái nguyên|thanh hóa|thừa thiên|wardak|yên bái|zabul|) province)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:caguas|ceiba|culebra|ponce|san juan|), puerto rico)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:caguas|ceiba|culebra|ponce|san juan|), puerto rico)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:pau|)\, pyrénées\-atlantiques)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:pau|)\, pyrénées\-atlantiques)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:montreal|quebec|sorel|valcartier|)\, quebec)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:montreal|quebec|sorel|valcartier|)\, quebec)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:caboolture|cairns|cookstown|gladstone|maryborough|ravenshoe|townsville|)\, queensland)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:caboolture|cairns|cookstown|gladstone|maryborough|ravenshoe|townsville|)\, queensland)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bristol|coventry|melville|middletown|newport|north kingstown|portsmouth|providence|), r\.i\.)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bristol|coventry|melville|middletown|newport|north kingstown|portsmouth|providence|), r\.i\.)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bristol|coventry|melville|middletown|newport|north kingstown|portsmouth|providence|), rhode island)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bristol|coventry|melville|middletown|newport|north kingstown|portsmouth|providence|), rhode island)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:natal|)\, rio grande do norte)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:natal|)\, rio grande do norte)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:armavir|don river|st\. petersburg|saint petersburg|samara|tula|)\, russia)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:armavir|don river|st\. petersburg|saint petersburg|samara|tula|)\, russia)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:saga|)\, saga)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:saga|)\, saga)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:regina|)\, saskatchewan)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:regina|)\, saskatchewan)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:halle|)\, saxony\-anhalt)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:halle|)\, saxony\-anhalt)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:glasgow|greenock|hamilton|inverness|perth|)\, scotland)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:glasgow|greenock|hamilton|inverness|perth|)\, scotland)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:dieppe|)\, seine\-maritime)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:dieppe|)\, seine\-maritime)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:mah[e|é]|)\, seychelles)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:mah[e|é]|)\, seychelles)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:yuncheng|)\, shanxi)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:yuncheng|)\, shanxi)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:augusta|syracuse|)\, sicily)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:augusta|syracuse|)\, sicily)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:balad|mogadishu|)\, somalia)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:balad|mogadishu|)\, somalia)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bath|)\, somerset)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bath|)\, somerset)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:warradale|)\, south australia)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:warradale|)\, south australia)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:aiken|beaufort|charleston|columbia|eastover|greenville|johns island|port royal|ridge spring|spartanburg|), south carolina)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:aiken|beaufort|charleston|columbia|eastover|greenville|johns island|port royal|ridge spring|spartanburg|), south carolina)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:aberdeen|fort pierre|sioux falls|), south dakota)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:aberdeen|fort pierre|sioux falls|), south dakota)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:seoul|)\, south korea)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:seoul|)\, south korea)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(south (?:african republic|asia|east asia|ossetia|shields|west pacific area|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(south (?:african republic|asia|east asia|ossetia|shields|west pacific area|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:cartagena|córdoba|ferrol|rota|toledo|valencia|)\, spain)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:cartagena|córdoba|ferrol|rota|toledo|valencia|)\, spain)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:córdoba|habsburg|trujillo|) spain)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:córdoba|habsburg|trujillo|) spain)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:matamoros|)\, tamaulipas)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:matamoros|)\, tamaulipas)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:devonport|)\, tasmania)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:devonport|)\, tasmania)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:biloxi|chattanooga|clifton|crossville|franklin|gallatin|germantown|grand junction|gulfport|kings(?:port|ton|)|knoxville|lagrange|memphis|middleton|millington|murfreesboro|nashville|oak ridge|saulsbury|shelbyville|union city|), tennessee)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:biloxi|chattanooga|clifton|crossville|franklin|gallatin|germantown|grand junction|gulfport|kings(?:port|ton|)|knoxville|lagrange|memphis|middleton|millington|murfreesboro|nashville|oak ridge|saulsbury|shelbyville|union city|), tennessee)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:abilene|amarillo|arlington|austin|beaumont|brackettville|breckenridge|brownsville|caddo|college station|conroe|corpus christi|dallas|denton|el paso|floresville|fort worth|ft\. worth|galveston|grand prairie|greenville|hillsboro|houston|irving|kingsville|jacksboro|laredo|lewisville|lubbock|mcallen|midland|mineral wells|orange|plano|port arthur|san (?:angelo|antonio)|sherman|tyler|uvalde|waco|wichita falls|), texas)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:abilene|amarillo|arlington|austin|beaumont|brackettville|breckenridge|brownsville|caddo|college station|conroe|corpus christi|dallas|denton|el paso|floresville|fort worth|ft\. worth|galveston|grand prairie|greenville|hillsboro|houston|irving|kingsville|jacksboro|laredo|lewisville|lubbock|mcallen|midland|mineral wells|orange|plano|port arthur|san (?:angelo|antonio)|sherman|tyler|uvalde|waco|wichita falls|), texas)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:western region|)\, uganda)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:western region|)\, uganda)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:oxford|)\, united kingdom)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:oxford|)\, united kingdom)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:manti|ogden|salt lake city|wendover|), utah)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:manti|ogden|salt lake city|wendover|), utah)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:veracruz|)\, veracruz)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:veracruz|)\, veracruz)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:burlington|essex|middlebury|milton|montpelier|orwell|rutland \(city\)|waterbury|winhall|), vermont)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:burlington|essex|middlebury|milton|montpelier|orwell|rutland \(city\)|waterbury|winhall|), vermont)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:melbourne|)\, victoria)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:melbourne|)\, victoria)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:happy valley|)\, vietnam)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:happy valley|)\, vietnam)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:aldie|alexandria|appomattox|arlington|bedford|berryville|black(?:burg|stone|)|chantilly|charlottesville|chesapeake|city point|cold harbor|culpeper|dale city|danville|dulles|dumfries|fairfax|falls church|farmville|fredericksburg|front royal|gloucester|gordonsville|hampton(?: roads|)|harrisonburg|haymarket|hopewell|james river|jamestown|leesburg|lexington|little creek|lorton|luray|lynchburg|manassas|marshall|mclean|mechanicsville(?:\, hanover county)|mountville|newport news|norfolk|orange|petersburg|portsmouth|prince william county|reston|richmond|roanoke|saltville|springfield|stafford|staunton|sterling|tabb|triangle|unison|upperville|virginia beach|warrenton|waynesboro|williamsburg|winchester|woodbridge|wytheville|yorktown|), virginia)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:aldie|alexandria|appomattox|arlington|bedford|berryville|black(?:burg|stone|)|chantilly|charlottesville|chesapeake|city point|cold harbor|culpeper|dale city|danville|dulles|dumfries|fairfax|falls church|farmville|fredericksburg|front royal|gloucester|gordonsville|hampton(?: roads|)|harrisonburg|haymarket|hopewell|james river|jamestown|leesburg|lexington|little creek|lorton|luray|lynchburg|manassas|marshall|mclean|mechanicsville(?:\, hanover county)|mountville|newport news|norfolk|orange|petersburg|portsmouth|prince william county|reston|richmond|roanoke|saltville|springfield|stafford|staunton|sterling|tabb|triangle|unison|upperville|virginia beach|warrenton|waynesboro|williamsburg|winchester|woodbridge|wytheville|yorktown|), virginia)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:aldie|alexandria|appomattox|arlington|bedford|berryville|black(?:burg|stone|)|chantilly|charlottesville|chesapeake|city point|cold harbor|culpeper|dale city|danville|dulles|dumfries|fairfax|falls church|farmville|fredericksburg|front royal|gloucester|gordonsville|hampton(?: roads|)|harrisonburg|haymarket|hopewell|james river|jamestown|leesburg|lexington|little creek|lorton|luray|lynchburg|manassas|marshall|mclean|mechanicsville(?:\, hanover county)|mountville|newport news|norfolk|orange|petersburg|portsmouth|prince william county|reston|richmond|roanoke|saltville|springfield|stafford|staunton|sterling|tabb|triangle|unison|upperville|virginia beach|warrenton|waynesboro|williamsburg|winchester|woodbridge|wytheville|yorktown|), va)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:aldie|alexandria|appomattox|arlington|bedford|berryville|black(?:burg|stone|)|chantilly|charlottesville|chesapeake|city point|cold harbor|culpeper|dale city|danville|dulles|dumfries|fairfax|falls church|farmville|fredericksburg|front royal|gloucester|gordonsville|hampton(?: roads|)|harrisonburg|haymarket|hopewell|james river|jamestown|leesburg|lexington|little creek|lorton|luray|lynchburg|manassas|marshall|mclean|mechanicsville(?:\, hanover county)|mountville|newport news|norfolk|orange|petersburg|portsmouth|prince william county|reston|richmond|roanoke|saltville|springfield|stafford|staunton|sterling|tabb|triangle|unison|upperville|virginia beach|warrenton|waynesboro|williamsburg|winchester|woodbridge|wytheville|yorktown|), va)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:aberdeen|auburn|bainbridge island|bangor|bellingham|bellevue|bremerton|centralia|colfax|coupeville|everett|federal way|fort townsend|houghton|ilwaco|kennewick|kent|lacey|longview|marysville|montesano|moses lake|oak harbor|olympia|orting|pasco|port townsend|pullman|puyallup|redmond|richland|seattle|silverdale|spanaway|spokane|tacoma|vancouver|walla walla|yakima|), washington)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:aberdeen|auburn|bainbridge island|bangor|bellingham|bellevue|bremerton|centralia|colfax|coupeville|everett|federal way|fort townsend|houghton|ilwaco|kennewick|kent|lacey|longview|marysville|montesano|moses lake|oak harbor|olympia|orting|pasco|port townsend|pullman|puyallup|redmond|richland|seattle|silverdale|spanaway|spokane|tacoma|vancouver|walla walla|yakima|), washington)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:beckley|charleston|darkesville|kableton|keystone|lewisburg|martinsburg|moorefield|new martinsville|princeton|ravenswood|weirton|wheeling|), west virginia)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:beckley|charleston|darkesville|kableton|keystone|lewisburg|martinsburg|moorefield|new martinsville|princeton|ravenswood|weirton|wheeling|), west virginia)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:fremantle|perth|)\, western australia)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:fremantle|perth|)\, western australia)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:george|)\, western cape)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:george|)\, western cape)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:westbury|)\, wiltshire)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:westbury|)\, wiltshire)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:allouez|ashland|beloit|green bay|kewaunee|madison|manitowoc|marinette|milwaukee|sturgeon bay|superior|), wisconsin)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:allouez|ashland|beloit|green bay|kewaunee|madison|manitowoc|marinette|milwaukee|sturgeon bay|superior|), wisconsin)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:casper|cheyenne|greybull|), wyoming)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:casper|cheyenne|greybull|), wyoming)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ube|), yamaguchi)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ube|), yamaguchi)\]\]", "$1"); // //Delink counties, provinces and territories ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(([a-z]+) county\,\s(?:alabama|alaska|arkansas|california|colorado|florida|georgia|idaho|illinois|indiana|iowa|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new hampshire|new jersey|new mexico|new york|north carolina|north dakota|ohio|oklahoma|oregon|pennsylvania|san (?:antonio|diego|francisco|juan|mateo|pedro|)|south carolina|south dakota|southern (?:california|united states|)|tennessee|texas|u\.s\. east coast|utah|vermont|virginia|washington(?: metropolitan area|)|west (?:coast of the united states|virginia|)|western united states|wisconsin))\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(([a-z]+) county\,\s(?:alabama|alaska|arkansas|california|colorado|florida|georgia|idaho|illinois|indiana|iowa|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new hampshire|new jersey|new mexico|new york|north carolina|north dakota|ohio|oklahoma|oregon|pennsylvania|san (?:antonio|diego|francisco|juan|mateo|pedro|)|south carolina|south dakota|southern (?:california|united states|)|tennessee|texas|u\.s\. east coast|utah|vermont|virginia|washington(?: metropolitan area|)|west (?:coast of the united states|virginia|)|western united states|wisconsin))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:apache|cochise|coconino|gila|graham|greenlee|la paz|maricops|mohave|navajo|pima|pinal|santa cruz|yavapai|yuma|) county\, arizona)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:apache|cochise|coconino|gila|graham|greenlee|la paz|maricops|mohave|navajo|pima|pinal|santa cruz|yavapai|yuma|) county\, arizona)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alameda|contra costa|fresno|kern|los angeles|orange|riverside|(?:san bernardino|diego|francisco|mateo|joaquin)|santa clara|sacramento|ventura) county\, california)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alameda|contra costa|fresno|kern|los angeles|orange|riverside|(?:san bernardino|diego|francisco|mateo|joaquin)|santa clara|sacramento|ventura) county\, california)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:fairfield|hartford|litchfield|middlesex|new (?:haven|london|)|tollard|windham|) county\, connecticut)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:fairfield|hartford|litchfield|middlesex|new (?:haven|london|)|tollard|windham|) county\, connecticut)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:kent|new castle|sussex|) county\, delaware)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:kent|new castle|sussex|) county\, delaware)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:hawaii|honolulu|kalawao|kauai|maui|) county\, hawaii)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:hawaii|honolulu|kalawao|kauai|maui|) county\, hawaii)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:anne arundel|) county\, maryland)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:anne arundel|) county\, maryland)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bristol|kent|newport|providence|washington|) county\, rhode island)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bristol|kent|newport|providence|washington|) county\, rhode island)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(province of (?:brandenburg|hanover|maine|massacusetts bay|new york|posen|quebec \(1763\-1791\)|virginia|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(province of (?:brandenburg|hanover|maine|massacusetts bay|new york|posen|quebec \(1763\-1791\)|virginia|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alaska|arizona|colorado|dakota|florida|hawaii|indian|kansas|montana|nebraska|nevada|new mexico|northern|northwest|oregon|utah|washington|wyoming|) territory)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alaska|arizona|colorado|dakota|florida|hawaii|indian|kansas|montana|nebraska|nevada|new mexico|northern|northwest|oregon|utah|washington|wyoming|) territory)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(territory of (?:alaska|arizona|dakota|florida|hawaii|montana|new (?:guinea|mexico|)|oregon|utah|washington|wyoming|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(territory of (?:alaska|arizona|dakota|florida|hawaii|montana|new (?:guinea|mexico|)|oregon|utah|washington|wyoming|))\]\]", "$1"); // //delink lakes, bays, islands, rivers, creeks, mountains, interstates and parks ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(adige|adriatic|aleutians|andes|antarctica|anzac cove|apache pass|archipelago|atlantic(?: \(ocean\)|)|atoll|azores)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(adige|adriatic|aleutians|andes|antarctica|anzac cove|apache pass|archipelago|atlantic(?: \(ocean\)|)|atoll|azores)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(barra head|bay of (?:bengal|biscay|fundy|)|bear island \(norway\)|bear paw mountains|beaufort isle|bering strait|bikini atoll|bismarck archipelago|blanco canyon|blue ridge mountains|boston harbor|(?:brooklyn|golden gate|pontoon|) bridge|bristol channel|british (?:isles|west indies|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(barra head|bay of (?:bengal|biscay|fundy|)|bear island \(norway\)|bear paw mountains|beaufort isle|bering strait|bikini atoll|bismarck archipelago|blanco canyon|blue ridge mountains|boston harbor|(?:brooklyn|golden gate|pontoon|) bridge|bristol channel|british (?:isles|west indies|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(cam ranh bay|canary islands)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(cam ranh bay|canary islands)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(cape (?:coast|cod|colony|finisterre|hatteras|helles|henry|horn|of good hope|ortegal|palmas|race|ray|st\. vincent|verde|verde islands))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(cape (?:coast|cod|colony|finisterre|hatteras|helles|henry|horn|of good hope|ortegal|palmas|race|ray|st\. vincent|verde|verde islands))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(caribbean|causeway|channel islands of california|chichi jima|chuuk lagoon|coast|cooper river \(south carolina\))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(caribbean|causeway|channel islands of california|chichi jima|chuuk lagoon|coast|cooper river \(south carolina\))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(danube|denmark strait|don river \(russia\)|dungeness \(headland\))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(danube|denmark strait|don river \(russia\)|dungeness \(headland\))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(elbe|english channel|espiritu santo|euphrates)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(elbe|english channel|espiritu santo|euphrates)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(far east|firth of (?:clyde|forth|)|fjord|ford \(crossing\))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(far east|firth of (?:clyde|forth|)|fjord|ford \(crossing\))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(golden horn|grand harbour|great (?:lakes|plains|)|(?:leyte|lingayen|) gulf)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(golden horn|grand harbour|great (?:lakes|plains|)|(?:leyte|lingayen|) gulf)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gulf of (?:aden|alaska|california|chania|corinth|finland|lion|mexico|naples|oman|patras|riga|roses|siam|taranto|thailand|tonkin|tunis|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gulf of (?:aden|alaska|california|chania|corinth|finland|lion|mexico|naples|oman|patras|riga|roses|siam|taranto|thailand|tonkin|tunis|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(halifax harbour|horn of africa)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(halifax harbour|horn of africa)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(interstate highway|ironbottom sound|isle of (?:man|portland|wight|)|isles of scilly)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(interstate highway|ironbottom sound|isle of (?:man|portland|wight|)|isles of scilly)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(i\-(\d{1,1}))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(i\-(\d{1,1}))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(i\-(\d{1,2}))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(i\-(\d{1,2}))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(i\-(\d{1,3}))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(i\-(\d{1,3}))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(interstate (\d{1,1}))\]\]", "I-$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(interstate (\d{1,1}))\|([^\]]+?)\]\]", "I-$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(interstate (\d{1,2}))\]\]", "I-$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(interstate (\d{1,2}))\|([^\]]+?)\]\]", "I-$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(interstate (\d{1,3}))\]\]", "I-$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(interstate (\d{1,3}))\|([^\]]+?)\]\]", "I-$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(james river \(virginia\)|jetty)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(james river \(virginia\)|jetty)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(karelian isthmus|khyber pass|kolombangara|kwajalein atoll)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(karelian isthmus|khyber pass|kolombangara|kwajalein atoll)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(lake (?:baikal|champlain|constance|erie|george \(new york\)|habbaniyah|huron|ilmen|ladoga|lanao|michigan|ontario|qadisiyah|superior|tahoe|tiberius|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(lake (?:baikal|champlain|constance|erie|george \(new york\)|habbaniyah|huron|ilmen|ladoga|lanao|michigan|ontario|qadisiyah|superior|tahoe|tiberius|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(landscape|leros|lincoln highway|long island sound|(?:java|new ireland|leyte|newfoundland|) \(island\)|los angeles basin|low countries|luzon strait)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(landscape|leros|lincoln highway|long island sound|(?:java|new ireland|leyte|newfoundland|) \(island\)|los angeles basin|low countries|luzon strait)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(makassar strait|makin \(islands\)|malacca straits|mediterranean|mekong delta|mount fuji)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(makassar strait|makin \(islands\)|malacca straits|mediterranean|mekong delta|mount fuji)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(nansei shoto|national park|neretva|nile|north (?:atlantic|channel \(british isles\)))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(nansei shoto|national park|neretva|nile|north (?:atlantic|channel \(british isles\)))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(pacific|panama canal|paraná river|peleliu|persian gulf|plateau|portland harb[o|ou]r|puget sound|pyrenees)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(pacific|panama canal|paraná river|peleliu|persian gulf|plateau|portland harb[o|ou]r|puget sound|pyrenees)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(port (?:edgar|glasgow|huron|lyautey|moresby|royal|said|)|port of (?:haifa|los angeles|san francisco|spain|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(port (?:edgar|glasgow|huron|lyautey|moresby|royal|said|)|port of (?:haifa|los angeles|san francisco|spain|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(rapid|reef|rio grande|rhine|rio grande|rock of gibraltar)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(rapid|reef|rio grande|rhine|rio grande|rock of gibraltar)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(river (?:clyde|dives|elbe|forth|medway|mersey|po|rhine|seine|shannon|thames|tyne|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(river (?:clyde|dives|elbe|forth|medway|mersey|po|rhine|seine|shannon|thames|tyne|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(san bernardino strait|san diego harbor|san pedro bay \(philippines\))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(san bernardino strait|san diego harbor|san pedro bay \(philippines\))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(sea of (?:azov|japan|marmara|okhotsk|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(sea of (?:azov|japan|marmara|okhotsk|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(seto inland sea|shenandoah valley|sinai|soča|south (?:atlantic|pacific|)|st\. (?:george\'s channel|lawrence river)|stanley harbour)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(seto inland sea|shenandoah valley|sinai|soča|south (?:atlantic|pacific|)|st\. (?:george\'s channel|lawrence river)|stanley harbour)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(strait of (?:dover|hormuz|juan de fuca|kerch|magellan|malacca|otranto|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(strait of (?:dover|hormuz|juan de fuca|kerch|magellan|malacca|otranto|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(straits of (?:gibraltar|magellan|)|suez canal|sunda strait|surigao strait)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(straits of (?:gibraltar|magellan|)|suez canal|sunda strait|surigao strait)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(taiwan(?: strait|)|thames(?: estuary|)|the hague|tigris|tisza|tonkin gulf|torres strait)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(taiwan(?: strait|)|thames(?: estuary|)|the hague|tigris|tisza|tonkin gulf|torres strait)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\. gulf coast|national monument|west coast)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\. gulf coast|national monument|west coast)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\. highway (\d{1,1}))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\. highway (\d{1,1}))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\. highway (\d{1,2}))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\. highway (\d{1,2}))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\. highway (\d{1,3}))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\. highway (\d{1,3}))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\. route (\d{1,1}))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\. route (\d{1,1}))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\. route (\d{1,2}))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\. route (\d{1,2}))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\. route (\d{1,3}))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\. route (\d{1,3}))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\. route (\d{1,4}))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\. route (\d{1,4}))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(virginia capes|vis \(island\))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(virginia capes|vis \(island\))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(york river \(virginia\)|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(york river \(virginia\)|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:adriatic|arabian|aegean|baltic|barents|beaufort|bering|black|caribbean|caspian|celebes|coral|east china|ionian|irish|java|mediterranean|north|norwegian|north arabian|philippine|red|saint kitts|seto inland|solomons|south china|sulu|swan|tyrrhenian|white|yellow|)[ ]*sea)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:adriatic|arabian|aegean|baltic|barents|beaufort|bering|black|caribbean|caspian|celebes|coral|east china|ionian|irish|java|mediterranean|north|norwegian|north arabian|philippine|red|saint kitts|seto inland|solomons|south china|sulu|swan|tyrrhenian|white|yellow|)[ ]*sea)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:botany|cabanas|cape cod|chesapeake|delaware|guantanamo|hudson|manila|miramichi|mobile|purvis|yos sudarso|) bay)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:botany|cabanas|cape cod|chesapeake|delaware|guantanamo|hudson|manila|miramichi|mobile|purvis|yos sudarso|) bay)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:wounded knee) creek)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:wounded knee) creek)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:cape fear|columbia|euphrates|little bighorn|mississippi|missouri|nile|north platte|red|saint lawrence|south platte|st\. johns|snake|tigris|) river)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:cape fear|columbia|euphrates|little bighorn|mississippi|missouri|nile|north platte|red|saint lawrence|south platte|st\. johns|snake|tigris|) river)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(([a-z]+) creek)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(([a-z]+) creek)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(([a-z]+) river)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(([a-z]+) river)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(([a-z]+) national park)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(([a-z]+) national park)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(([a-z]+) mountain(?:s|))\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(([a-z]+) mountain(?:s|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:apra|charleston|dutch|honolulu|portland|) harb[o|ou]r)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:apra|charleston|dutch|honolulu|portland|) harb[o|ou]r)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:arctic|atlantic|baltic|indian|north atlantic|pacific|west(?:ern|) pacific|) ocean)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:arctic|atlantic|baltic|indian|north atlantic|pacific|west(?:ern|) pacific|) ocean)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:adak|Åland|andaman|admiralty|aleutian|ambon|ascension|attu|balearic|batan|beaufort|bonin|bougainville|buka|canary|canton|cape (?:breton|clear)|carlin|caroline|cayman|channel|christmas|clipperton|cocos \(keeling\)|cook|dodecanese|easter|ellice|falkland|faroe|fiji|florida|gal[á|a]pagos|gilbert|governors|hainan|ionian|johnston|hawaiian|japanese home|kodiak|kuril(?:e|)|league|leeward|leyte|manhattan|manus|marcus|mariana(?:s|)|midway|morris|negros|norfolk|north|northern mariana|orkney|palau|philippine|phoenix|prince edward|russell|ryukyu|sable|savo|schouten|shetland|solomon|south|terminal|thursday|tonga|vancouver|virgin|volcano|whidbey|) island(?:s|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:adak|Åland|andaman|admiralty|aleutian|ambon|ascension|attu|balearic|batan|beaufort|bonin|bougainville|buka|canary|canton|cape (?:breton|clear)|carlin|caroline|cayman|channel|christmas|clipperton|cocos \(keeling\)|cook|dodecanese|easter|ellice|falkland|faroe|fiji|florida|gal[á|a]pagos|gilbert|governors|hainan|ionian|johnston|hawaiian|japanese home|kodiak|kuril(?:e|)|league|leeward|leyte|manhattan|manus|marcus|mariana(?:s|)|midway|morris|negros|norfolk|north|northern mariana|orkney|palau|philippine|phoenix|prince edward|russell|ryukyu|sable|savo|schouten|shetland|solomon|south|terminal|thursday|tonga|vancouver|virgin|volcano|whidbey|) island(?:s|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bisca(?:ne|y|)|brunei|buckner|camranh|casco|empress augusta|fortune|galveston|hudson|humboldt|jervis|loksa|milne|moreton|narragansett|ormoc|oro|pensacola|province of massachusetts|san diego|san francisco|stokes|suisun|thunder|tokyo|) bay)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bisca(?:ne|y|)|brunei|buckner|camranh|casco|empress augusta|fortune|galveston|hudson|humboldt|jervis|loksa|milne|moreton|narragansett|ormoc|oro|pensacola|province of massachusetts|san diego|san francisco|stokes|suisun|thunder|tokyo|) bay)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ohio|texas|) state route (?:5|66|71|77|81|95|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ohio|texas|) state route (?:5|66|71|77|81|95|))\|([^\]]+?)\]\]", "$2"); // //ends with ist and ism ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:abolition|agrarian|anarch|anglican|antagon|anti\-zion|arab national|authoritarian|bilingual|bolshev|calvin|cannibal|canton|capital|castro|chinese buddh|collaboration|colonial|commun|confucian|conservat|dao|de|equestrian|eurocommun|fasc|federal|femin|feudal|gaull|goulash commun|guevar|hindu|hoxha|human|ideal|imperial|irish national|irish republican|islam|isolation|jacobit|lassil|left|lenin|liberal|libertarian|lutheran|manorial|mao|marx|marxism/–lenin|method|modern|monarch|monetar|nepot|national|naz|nihil|optim|pacif|pagan|palestinian national|pan\-asian|patriot|peron|pessim|popul|presbyterian|presidential|progressiv|protestant|rac|rational|real|republican|romantic|sarmat|secular|semit|seperat|shaman|social|stalin|suffrag|tao|thatcher|tito|tonal|totalitarian|tour|traditional|tsar|ulster loyal|unitarian|volunt[aee]r|zion|)is[mt])\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:abolition|agrarian|anarch|anglican|antagon|anti\-zion|arab national|authoritarian|bilingual|bolshev|calvin|cannibal|canton|capital|castro|chinese buddh|collaboration|colonial|commun|confucian|conservat|dao|de|equestrian|eurocommun|fasc|federal|femin|feudal|gaull|goulash commun|guevar|hindu|hoxha|human|ideal|imperial|irish national|irish republican|islam|isolation|jacobit|lassil|left|lenin|liberal|libertarian|lutheran|manorial|mao|marx|marxism/–lenin|method|modern|monarch|monetar|nepot|national|naz|nihil|optim|pacif|pagan|palestinian national|pan\-asian|patriot|peron|pessim|popul|presbyterian|presidential|progressiv|protestant|rac|rational|real|republican|romantic|sarmat|secular|semit|seperat|shaman|social|stalin|suffrag|tao|thatcher|tito|tonal|totalitarian|tour|traditional|tsar|ulster loyal|unitarian|volunt[aee]r|zion|)is[mt])\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:abolition|agrarian|anarch|anglican|antagon|anti\-zion|arab national|authoritarian|bilingual|bolshev|calvin|canton|cannibal|capital|castro|chinese buddh|collaboration|colonial|commun|confucian|conservat|dao|de|equestrian|eurocommun|fasc|federal|femin|feudal|gaull|goulash commun|guevar|hindu|hoxha|human|ideal|imperial|irish national|irish republican|islam|isolation|jacobit|lassil|left|lenin|liberal|libertarian|lutheran|manorial|mao|marx|marxism/–lenin|method|modern|monarch|monetar|nepot|national|naz|nihil|optim|pacif|pagan|palestinian national|pan\-asian|patriot|peron|pessim|popul|presbyterian|presidential|progressiv|protestant|rac|rational|real|republican|romantic|sarmat|secular|semit|seperat|shaman|social|stalin|suffrag|tao|thatcher|tito|tonal|totalitarian|tour|traditional|tsar|ulster loyal|unitarian|volunt[aee]r|zion|)is[mt](s))\]\]", "$1"); // //Anti- ends with ist and ism ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(anti\-(?:abolition|agrarian|anglican|anarch|anglican|antagon|anti\-zion|arab national|authoritarian|bolshev|calvin|canton|capital|castro|collaboration|colonial|commun|confucian|conservat|dao|de|eurocommun|fasc|federal|femin|feudal|gaull|goulash commun|guevar|hindu|hoxha|human|ideal|imperial|islam|isolation|jacobit|lassil|left|lenin|liberal|libertarian|lutheran|mao|marx|marxism/–lenin|method|modern|monarch|monetar|nepot|national|naz|nihil|optim|pacif|pagan|palestinian national|pan\-slav|parliamentarian|patriot|peron|pessim|political radical|presbyterian|presidential|progressiv|protestant|rac|rational|real|republican|romantic|sarmat|secular|semit|shaman|social|stalin|tao|thatcher|tito|tonal|totalitarian|tour|traditional|tsar|ulster loyal|volunt[aee]r|zion|)is[mt])\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(anti\-(?:abolition|agrarian|anglican|anarch|anglican|antagon|anti\-zion|arab national|authoritarian|bolshev|calvin|canton|capital|castro|collaboration|colonial|commun|confucian|conservat|dao|de|eurocommun|fasc|federal|femin|feudal|gaull|goulash commun|guevar|hindu|hoxha|human|ideal|imperial|islam|isolation|jacobit|lassil|left|lenin|liberal|libertarian|lutheran|mao|marx|marxism/–lenin|method|modern|monarch|monetar|nepot|national|naz|nihil|optim|pacif|pagan|palestinian national|pan\-slav|parliamentarian|patriot|peron|pessim|political radical|presbyterian|presidential|progressiv|protestant|rac|rational|real|republican|romantic|sarmat|secular|semit|shaman|social|stalin|tao|thatcher|tito|tonal|totalitarian|tour|traditional|tsar|ulster loyal|volunteer|zion|)is[mt])\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(anti\-(?:abolition|agrarian|anglican|anarch|anglican|antagon|anti\-zion|arab national|authoritarian|bolshev|calvin|canton|capital|castro|collaboration|colonial|commun|confucian|conservat|dao|de|eurocommun|fasc|federal|femin|feudal|gaull|goulash commun|guevar|hindu|hoxha|human|ideal|imperial|islam|isolation|jacobit|lassil|left|lenin|liberal|libertarian|lutheran|mao|marx|marxism/–lenin|method|modern|monarch|monetar|nepot|national|naz|nihil|optim|pacif|pagan|palestinian national|pan\-slav|parliamentarian|patriot|peron|pessim|political radical|presbyterian|presidential|progressiv|protestant|rac|rational|real|republican|romantic|sarmat|secular|semit|shaman|social|stalin|tao|thatcher|tito|tonal|totalitarian|tour|traditional|tsar|ulster loyal|volunt[aee]r|zion|)is[mt](s))\]\]", "$1"); // // Business, economics and commerce ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(\£sd)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(\£sd)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:air |)pollution|alcohol(?:ic beverage)|ale|alfalfa|almond|apple(?:s|)|assault)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:air |)pollution|alcohol(?:ic beverage)|ale|alfalfa|almond|apple(?:s|)|assault)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(bamboo|bank(?:er|ing|s| of england|note|)|barley|beef|black market|board of trade|boer|budget deficit|bunk bed|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(bamboo|bank(?:er|ing|s| of england|note|)|barley|beef|black market|board of trade|boer|budget deficit|bunk bed|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(cactus|california gold rush|capital|cargo|carpent(?:er|ry|)|cent|central bank|cereal|chicken|cigar|club|coal(?: mine| miner| miners| mining| dust|)|coin(?:s|age|)|colou?r|confectionery|congressional budget office|contraband|contracts?|coral|corn|corporation|cosmetic|crime|currenc(?:y|ie)|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(cactus|california gold rush|capital|cargo|carpent(?:er|ry|)|cent|central bank|cereal|chicken|cigar|club|coal(?: mine| miner| miners| mining| dust|)|coin(?:s|age|)|colou?r|confectionery|congressional budget office|contraband|contracts?|coral|corn|corporation|cosmetic|crime|currenc(?:y|ie)|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(delivery \(commerce\)|design|distribution \(business\)|dollar|down[ -]?town|ducat|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(delivery \(commerce\)|design|distribution \(business\)|dollar|down[ -]?town|ducat|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(economic community of west african states|electricity|embargo|(?:un|)employ(?:e[der]s?|ment)|ersatz|ethanol|euro|european economic community|exclusive economic zone|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(economic community of west african states|electricity|embargo|(?:un|)employ(?:e[der]s?|ment)|ersatz|ethanol|euro|european economic community|exclusive economic zone|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(federal (?:reserve system|trade commission)|finance|fire|flint|flour|flower|forced (?:labor|labour)|franc(?:s)|french franc(?:s)|fund(?:ing|raising)|fur trade)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(federal (?:reserve system|trade commission)|finance|fire|flint|flour|flower|forced (?:labor|labour)|franc(?:s)|french franc(?:s)|fund(?:ing|raising)|fur trade)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gas(?:oline|)|GDP|globalization|grain(?: elevator)|great depression|gross domestic product)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gas(?:oline|)|GDP|globalization|grain(?: elevator)|great depression|gross domestic product)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(hardwood|hay|heating|hemp|hops|human factors|hundredweight)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(hardwood|hay|heating|hemp|hops|human factors|hundredweight)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(illegal immigration|imf|indian rupee|inflation|institute|insurance|integrated logistics support|international monetary fund|internet|inventor|invest(?:or|ors|ment|ment capital|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(illegal immigration|imf|indian rupee|inflation|institute|insurance|integrated logistics support|international monetary fund|internet|inventor|invest(?:or|ors|ment|ment capital|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(job|joint ventures?)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(job|joint ventures?)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(land grant|lend(?:\-lease| lease|)|lettuce)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(land grant|lend(?:\-lease| lease|)|lettuce)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(magazine|maize|malt|management|manufacturing|market(?:s|ing|)|material|meat|merchant(?:s|)|metalwork|money|mosque|mule)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(magazine|maize|malt|management|manufacturing|market(?:s|ing|)|material|meat|merchant(?:s|)|metalwork|money|mosque|mule)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(national (?:debt|savings)|new (?:product development|york stock exchange)|(?:news|)paper|noodle|north american free trade agreement)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(national (?:debt|savings)|new (?:product development|york stock exchange)|(?:news|)paper|noodle|north american free trade agreement)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(oat(?:s)|oil(?: depot|seed|seeds)|orchard|organi[sz](?:e|ation))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(oat(?:s)|oil(?: depot|seed|seeds)|orchard|organi[sz](?:e|ation))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(paid off|peanut(?:s|)|party|peach|pearl|pence|per capita(?: income|)|performance\-based logistics|personnel|peso|petrol(?:eum|)|pine(?:apple)|plantation|plastic|plum|plywood|pork|poultry|pound|poverty line|procurement|product(?: \(business\))|publicity)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(paid off|peanut(?:s|)|party|peach|pearl|pence|per capita(?: income|)|performance\-based logistics|personnel|peso|petrol(?:eum|)|pine(?:apple)|plantation|plastic|plum|plywood|pork|poultry|pound|poverty line|procurement|product(?: \(business\))|publicity)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(rand|raw material|reichsmark|requisition|rice|rubber|ruble|rum|russian ruble|rye)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(rand|raw material|reichsmark|requisition|rice|rubber|ruble|rum|russian ruble|rye)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(salary|sales tax|sawmill(?:ing|s)|scrap|service \(economics\)|shilling|shipping|slave(?:s|ry| trade|)|smelt(?:ed|ing|er|)|smog|soil|solidus \(coin\)|soy(?:bean|)|spruce|stevedore|stockbroker|strawberry|subsidiary|sugar(?:beet|beets|)|sunflower(?:s|)|super(?:fund|market)|sweet corn|synthesi[sz]er|synagog(?:ue|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(salary|sales tax|sawmill(?:ing|s)|scrap|service \(economics\)|shilling|shipping|slave(?:s|ry| trade|)|smelt(?:ed|ing|er|)|smog|soil|solidus \(coin\)|soy(?:bean|)|spruce|stevedore|stockbroker|strawberry|subsidiary|sugar(?:beet|beets|)|sunflower(?:s|)|super(?:fund|market)|sweet corn|synthesi[sz]er|synagog(?:ue|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(television(?: network)|temple|tenant farmer|textile|theater|theatre|time(?:line|)|tithe|tobacco|tofu|toxic waste|tungsten)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(television(?: network)|temple|tenant farmer|textile|theater|theatre|time(?:line|)|tithe|tobacco|tofu|toxic waste|tungsten)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(USD)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(USD)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(vineyard)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(vineyard)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(wage|wall street|warehouse|water|website|wheat|whiskey|wild rice|world (?:bank|heritage site|trade organization)|wto)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(wage|wall street|warehouse|water|website|wheat|whiskey|wild rice|world (?:bank|heritage site|trade organization)|wto)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united states dollar|US\$|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(united states dollar|US\$|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(yeast|yen|yuan)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(yeast|yen|yuan)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[gross domestic product\|(GDP)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(advertis(?:ing|ement)|brand|consumer|logo|market(?:ing|)|sign(?:age|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:(?:agriculture|horticulture)\||)((agri|horti)(culture|cultural))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[orange \((?:colou?r|fruit)\)\|(oranges?)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:tele|)communic(?:ation|ate))(s|)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(air(?:craft|line|plane|port|)|transport(?:ation|)|train|tram|)(s|)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(trad(e|ing)|shipping)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:rail transport\||)(rail|railways?|railroad)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:retailing\||)(retail(?:er|ing|)|(?:retail |)shop)(s|)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:economics\||)(economics?|economists?|economical)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:statistics\||)(statistics?|statisticians?|statistical)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(profit(?:able|ability|s|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((im|ex)(port(?:er|)s?))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((immi|emi)(grate[sd]|gration))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(factor(?:y|ies)|manufactur(?:er?|ing))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(coal min(e[rs]?|ing))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:farming\||)(farm(er|s|ing|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:history\||)(histor(?:ical|ian|ies|y))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(NGO|non-?(?:governmental|profit)(\sorgani[sz]ations?|))(s|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(charitable\sorgani[sz]ations?|charit(?:ies|y))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[non-?profit\sorgani[sz]ation\|(non-?profit\sorgani[sz]ations?|non-profit)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[non-?(?:governmental|profit)\sorgani[sz]ation\|(non-?(?:governmental|profit)\sorgani[sz]ation|NGO)(s|)\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:charity \(practice\)|charitable\sorgani[sz]ation)\|(charitable\sorgani[sz]ations?|charit(?:able|ies|y))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(?:county\||)(count(y|ies|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(501\(c\))\]\]", "$1"); // // weather, seasons and climate ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(barometric pressure|cloud|cold front|dew point|drought|ecolog(?:ical|ists?|y)|fall|flood|fog|full moon|hurricane|lightning|monsoon|national hurricane center|ozone|rain(?:fall|)|snow|spring|storm|summer|thunder|thunderstorm|tornado|tropical (?:cyclone|storm|)|tsunami|typhoon|weather(?: forecasting|)|winter)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(barometric pressure|cloud|cold front|dew point|drought|ecolog(?:ical|ists?|y)|fall|flood|fog|full moon|hurricane|lightning|monsoon|national hurricane center|ozone|rain(?:fall|)|snow|spring|storm|summer|thunder|thunderstorm|tornado|tropical (?:cyclone|storm|)|tsunami|typhoon|weather(?: forecasting|)|winter)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(hurricane (?:andrew|betsy|camille|dean|donna|floyd|gladys|gust[ao]v|hattie|hugo|ike|inez|iniki|irene|isabel‎|ivan|janet|katrina|lenny|mitch|rita|sandy|wilma|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(hurricane (?:andrew|betsy|camille|dean|donna|floyd|gladys|gust[ao]v|hattie|hugo|ike|inez|iniki|irene|isabel|ivan|janet|katrina|lenny|mitch|rita|sandy|wilma|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(2004 indian ocean earthquake|2010 haiti earthquake|2011 tōhoku earthquake and tsunami)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(2004 indian ocean earthquake|2010 haiti earthquake|2011 tōhoku earthquake and tsunami)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alpine|desert|oceanic|tropical) climate)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alpine|desert|oceanic|tropical) climate)\|([^\]]+?)\]\]", "$2"); // // measurements and perception ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(add(?:ition)|average|difference|mean|sum|total)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(add(?:ition)|average|difference|mean|sum|total)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(kilo(?:byte|gram|litre|liter|meter|metre|ton|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(kilo(?:byte|gram|litre|liter|meter|metre|ton|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(acre|celsius|feet|grain \(unit\)|grain \(measure\)|hectare|inch(?:es|)|in.|yard|mile|pound|ton(?:s|ne|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(acre|celsius|feet|grain \(unit\)|grain \(measure\)|hectare|inch(?:es|)|in.|yard|mile|pound|ton(?:s|ne|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:long|short) ton)\|([^\]]+?)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:long|short) ton)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ampere|bar \(unit\)|bronze age|builder\'s old measurement|center of gravity|circa|compression ratio|copper units of pressure|crush depth|doppler radar|fathom|fahrenheit|foot\-pound force|horse(?:power| power|power\#nominal horsepower| power\#nominal hoursepower|power\#shaft horsepower|)|hp|joule|kilojoule|kw|league \(unit\)|li \(unit\)|long ton|mach number|megapascal|metric system|nautical mile|octane rating|pound(?:\-force|\-force per square inch| sterling|)|pound \(mass\)|pounds per square inch|revolutions per minute|rpm|sectional density|simulator|speed \(knots\)|ton(?:|ne|nage)|torque|volt(?:age|)|watt(?:s|age|)|(?:giga|kilo|mega|tera|)watt|yards|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(ampere|bar \(unit\)|bronze age|builder\'s old measurement|center of gravity|circa|compression ratio|copper units of pressure|crush depth|doppler radar|fathom|fahrenheit|foot\-pound force|horse(?:power| power|power\#nominal horsepower| power\#nominal hoursepower|power\#shaft horsepower|)|hp|joule|kilojoule|kw|league \(unit\)|li \(unit\)|long ton|mach number|megapascal|metric system|nautical mile|octane rating|pound(?:\-force|\-force per square inch| sterling|)|pound \(mass\)|pounds per square inch|revolutions per minute|rpm|sectional density|simulator|speed \(knots\)|ton(?:|ne|nage)|torque|volt(?:age|)|watt(?:s|age|)|(?:giga|kilo|mega|tera|)watt|yards|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(utc\-(\d{1,1}))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(utc\-(\d{1,1}))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(square.)(feet|mile|kilo(?:meter|metre|)|yard)(s|)\]\]", "$1$2$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[foot \(unit\)\|(foot|feet)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"\[\[(?:centi|kilo|milli|)met(?:er|re)(?:s|)\|([ckm]?m)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"\[\[(?:centi|deci|hecto|milli|)lit(?:er|re)(?:s|)\|([cdHm]?l)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(stereo|mono)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"\[\[Ss](tereo)\]\]", "stereo"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[monaural\|(mono)\]\]", "$1");  ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(thermometer|thermostat)\]\]", "$1");  ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:indian|pacific|) standard time)\]\]", "$1");  ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:indian|pacific|) standard time)\|([^\+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:deadweight|gross register|gross weight|net register|net weight) tonnage)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:deadweight|gross register|gross weight|net register|net weight) tonnage)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:deadweight|gross register|gross weight|net register|net weight) ton(?:s|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:deadweight|gross register|gross weight|net register|net weight) ton(?:s|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:grain|knot|pascal|) \(unit\))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:grain|knot|pascal|) \(unit\))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gross ton)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gross ton)\|([^\]]+?)\]\]", "$2"); // // Misc words and phrases A-L ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(acronym|advocacy|aerobatics|air conditioning|annals|antenna \(radio\)|aol(?: news|)|arts|astrophysics|attorney|axle|ball(?:s|oon|)|banner|berm|bibliograph(?:s|y|ic|ic database)|blind(?:ed|ing|fold|)|b movie|bulb|cafeteria|camp(?:s|er|ers|ing|site|)|cap(?:e|)|cart|cash crop|cemeter(?:y|ies|)|charisma|charter|civil liberties|clemency|clay|coat of arms|comma\-separated values|construct(?:ed|ion|)|CSV|distillery|driving|drunk(?:en|enness|s|)|doctor|drown(?:ed|ing|)|dust|electric utility|epicenter|electronic(?:s|)|fence(?:s|ing|er|)|fiberglass|firefighter|flood control|foundry|fuel|gamezone|gear|hamm(?:er|ock|)|hanging|harvest|heir apparent|histor(?:y|iography|)|homage|humidity|hydro(?:dynamic|electric|electricity|static|gropher|)|ice|imprint|inhabitant(?:s|)|given name|granite|keyhole markup language|kidnapp(?:ed|ing|er|)|lathe|latin|law(?:s|yer|)|leather crafting|legal|light(?:s|er| house|ing|)|linen|loot(?:ed|ing))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(acronym|advocacy|aerobatics|air conditioning|annals|antenna \(radio\)|aol(?: news|)|arts|astrophysics|attorney|axle|ball(?:s|oon|)|banner|berm|bibliograph(?:s|y|ic|ic database)|blind(?:ed|ing|fold|)|b movie|bulb|cafeteria|camp(?:s|er|ers|ing|site|)|cap(?:e|)|cart|cash crop|cemeter(?:y|ies|)|charisma|charter|civil liberties|clemency|clay|coat of arms|comma\-separated values|construct(?:ed|ion|)|CSV|distillery|driving|drunk(?:en|enness|s|)|doctor|drown(?:ed|ing|)|dust|electric utility|epicenter|electronic(?:s|)|fence(?:s|ing|er|)|fiberglass|firefighter|flood control|foundry|fuel|gamezone|gear|hamm(?:er|ock|)|hanging|harvest|heir apparent|histor(?:y|iography|)|homage|humidity|hydro(?:dynamic|electric|electricity|static|gropher|)|ice|imprint|inhabitant(?:s|)|given name|granite|keyhole markup language|kidnapp(?:ed|ing|er|)|lathe|latin|law(?:s|yer|)|leather crafting|legal|light(?:s|er| house|ing|)|linen|loot(?:ed|ing))\|([^\]]+?)\]\]", "$2"); // // Misc words and phrases M-Z ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(map|mass(?:acre| grave| graves| rape| murder|)|metaphor|monument(?:s|)|myriad|naming taboo|natural resource|nuclear reactor|old english|pamphlet|PDF|peasant|pitch \(resin\)|philanthrop(?:y|ist|ic|)|picnic\s(?:s|er|ers|ing|site|basket|table|)|podcast(?:s|er)|portrait|print(?:ed|er|ing|ing house|ing press|)|probation|public auction|radium|recus(?:e|al|ed|)|riot(?:s|er|int|ed|)|rolling stone|satire|silk|silver \(color\)|slogan|spree|star(?:s|ing|ed|)|state of the art|strap(?:s|ping|ed|)|suburb|surname|teak|telegraph|terrain|tir(?:es|ing|ed|ade|)|train station|trippant|tutor|urban renewal|utc|vagrant(?:s|)|wagon train|webcast(?:s|er)|welding|w[iy]nch|XML)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(map|mass(?:acre| grave| graves| rape| murder|)|metaphor|monument(?:s|)|myriad|naming taboo|natural resource|nuclear reactor|old english|pamphlet|PDF|peasant|pitch \(resin\)|philanthrop(?:y|ist|ic|)|picnic\s(?:s|er|ers|ing|site|basket|table|)|podcast(?:s|er)|portrait|print(?:ed|er|ing|ing house|ing press|)|probation|public auction|radium|recus(?:e|al|ed|)|riot(?:s|er|int|ed|)|rolling stone|satire|silk|silver \(color\)|slogan|spree|star(?:s|ing|ed|)|state of the art|strap(?:s|ping|ed|)|suburb|surname|teak|telegraph|terrain|tir(?:es|ing|ed|ade|)|train station|trippant|tutor|urban renewal|utc|vagrant(?:s|)|wagon train|webcast(?:s|er)|welding|w[iy]nch|XML)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((copper|electrical|) wire|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((copper|electrical|) wire|)\|([^\]]+?)\]\]", "$3"); // // News organizations and publishers ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(60 Minutes)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(60 Minutes)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(abc\-clio|academia sinica|academic journal|aeronautical information publication|aftenposten|agence france\-presse|al (?:arabiya|jazeera|)|allen \& unwin|amc|anglo\-saxon chronicle|associated press|australian dictionary of biography|authorhouse|aviation week \& space technology)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(abc\-clio|academia sinica|academic journal|aeronautical information publication|aftenposten|agence france\-presse|al (?:arabiya|jazeera|)|allen \& unwin|amc|anglo\-saxon chronicle|associated press|australian dictionary of biography|authorhouse|aviation week \& space technology)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(baltimore sun|bbc|bbc (?:monitoring|online|radio 4|radio 7|)|biographical directory of the united states congress|blick|bloomberg|boston globe|box office mojo|brill publishers|businessweek)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(baltimore sun|bbc|bbc (?:monitoring|online|radio 4|radio 7|)|biographical directory of the united states congress|blick|bloomberg|boston globe|box office mojo|brill publishers|businessweek)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(calligraphy|cameraman|canadian broadcasting corporation|catholic news service|cbc news|channel 4|charleston post and courier|chicago (?:sun\-times|tribune|daily news|)|china daily|christianity today|columbia broadcasting system|correspondent)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(calligraphy|cameraman|canadian broadcasting corporation|catholic news service|cbc news|channel 4|charleston post and courier|chicago (?:sun\-times|tribune|daily news|)|china daily|christianity today|columbia broadcasting system|correspondent)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(der spiegel|dictionary of greek and roman biography and mythology|discovery channel|cnbc|C\-SPAN|CQ politics|encyclop[e|ae|æ]dia britannica|daily (?:express|telegraph|times \(pakistan\)))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(der spiegel|dictionary of greek and roman biography and mythology|discovery channel|cnbc|C\-SPAN|CQ politics|encyclop[e|ae|æ]dia britannica|daily (?:express|telegraph|times \(pakistan\)))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(entertainment weekly|espn)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(entertainment weekly|espn)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(faber and faber|fairfax media|fédération aéronautique internationale|forbes|fox(?: news channel|)|france 24)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(faber and faber|fairfax media|fédération aéronautique internationale|forbes|fox(?: news channel|)|france 24)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gakken|gannett company|gazeta wyborcza|globe and mail|google news(?: archive))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(gakken|gannett company|gazeta wyborcza|globe and mail|google news(?: archive))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(harper (?:collins|\& row)|harpers (?:magazine|weekly)|harper\'s (?:magazine|weekly)|HBO|herald sun|highBeam research|hippocrene books|honolulu star\-bulletin|houghton mifflin(?: harcourt|)|houston chronicle|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(harper (?:collins|\& row)|harpers (?:magazine|weekly)|harper\'s (?:magazine|weekly)|HBO|herald sun|highBeam research|hippocrene books|honolulu star\-bulletin|houghton mifflin(?: harcourt|)|houston chronicle|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(i\.b\. tauris|ign|illustrated encyclop[e|ae|æ]dia of aircraft|illustrated london news|international herald tribune|internetowa encyklopedia pwn|irish times)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(i\.b\. tauris|ign|illustrated encyclop[e|ae|æ]dia of aircraft|illustrated london news|international herald tribune|internetowa encyklopedia pwn|irish times)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(kavkaz center|kgtv|king\'s college london|kommersant|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(kavkaz center|kgtv|king\'s college london|kommersant|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(le monde|lenta\.ru|life magazine|lloyd\'s register|london gazette)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(le monde|lenta\.ru|life magazine|lloyd\'s register|london gazette)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(msnbc(?:\.com))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(msnbc(?:\.com))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(national (?:archives of australia|archives and records administration|enquirer|geographic society|public radio|review|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(national (?:archives of australia|archives and records administration|enquirer|geographic society|public radio|review|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(new (?:statesman|york daily news|)|news(?:day|reel|week)|new york tribune|nhk|norfolk virginian\-pilot|norsk biografisk leksikon|npr)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(new (?:statesman|york daily news|)|news(?:day|reel|week)|new york tribune|nhk|norfolk virginian\-pilot|norsk biografisk leksikon|npr)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(palgrave macmillan|paperboy|PBS|people\'s daily|philadelphia inquirer|pluto press|politico|popular (?:mechanics|science)|pr newswire|pravda|press tv|project gutenberg|public broadcasting service)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(palgrave macmillan|paperboy|PBS|people\'s daily|philadelphia inquirer|pluto press|politico|popular (?:mechanics|science)|pr newswire|pravda|press tv|project gutenberg|public broadcasting service)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(random house|ria novosti|rotten tomatoes|rowman \& littlefield|russia today|russian biographical dictionary)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(random house|ria novosti|rotten tomatoes|rowman \& littlefield|russia today|russian biographical dictionary)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(salon\.com|san antonio express\-news|san diego union\-tribune|sigismund iii vasa|simon \& schuster|sky news|sports illustrated|store norske leksikon)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(salon\.com|san antonio express\-news|san diego union\-tribune|sigismund iii vasa|simon \& schuster|sky news|sports illustrated|store norske leksikon)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(taylor \& francis|TBS|teleprinter|tf1)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(taylor \& francis|TBS|teleprinter|tf1)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(the (?:canberra|chicago sun|financial|herald and weekly|huntsville|irish|japan|los angeles|new york|seattle|st petersburg|st\. petersburg|sunday|washington|washington|) times)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(the (?:canberra|chicago sun|financial|herald and weekly|huntsville|irish|japan|los angeles|new york|seattle|st petersburg|st\. petersburg|sunday|washington|washington|) times)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(the (?:age|australian|boston globe|christian science monitor|crown|daily telegraph|economist|guardian|gentleman\'s magazine|globe and mail|hindu|hollywood reporter|independent|jakarta post|london gazette|miami news|montgomery advertiser|nation|new england herald|new york sun|new york times magazine|new zealand herald|o\'reilly factor|observer|oxford dictionary of byzantium|philidelphia enquirer|philadelphia inquirer|political graveyard|press|saturday evening post|sunday times \(uk\)|times|times of india|tripoli post|wall street journal|san diego union\-tribune|scotsman|tribune|trinity mirror|washington monthly|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(the (?:age|australian|boston globe|christian science monitor|crown|daily telegraph|economist|guardian|gentleman\'s magazine|globe and mail|hindu|hollywood reporter|independent|jakarta post|london gazette|miami news|montgomery advertiser|nation|new england herald|new york sun|new york times magazine|new zealand herald|o\'reilly factor|observer|oxford dictionary of byzantium|philidelphia enquirer|philadelphia inquirer|political graveyard|press|saturday evening post|sunday times \(uk\)|times|times of india|tripoli post|wall street journal|san diego union\-tribune|scotsman|tribune|trinity mirror|washington monthly|))\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(times of (?:india|malta)|toronto star|time[ ]*(?:inc\.|\-life|life|magazine|)|tribune company|turner publishing company|twentieth century fox)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(times of (?:india|malta)|toronto star|time[ ]*(?:inc\.|\-life|life|magazine|)|tribune company|turner publishing company|twentieth century fox)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\. news \& world report|united press international|universal newsreel|university of massachusetts press|usa(?: today|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(u\.s\. news \& world report|united press international|universal newsreel|university of massachusetts press|usa(?: today|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(vanity fair \(british magazine\)|variety(?: magazine|)|verlag e\.s\. mittler \& sohn gmbh)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(vanity fair \(british magazine\)|variety(?: magazine|)|verlag e\.s\. mittler \& sohn gmbh)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(w\. w\. norton \& company|wall street journal|washington times\-herald|who\'s who \(uk\)|wordpress|xinhua news agency)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(w\. w\. norton \& company|wall street journal|washington times\-herald|who\'s who \(uk\)|wordpress|xinhua news agency)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(yahoo\! news|ynet|ynet(?:news)|youtube\.com)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(yahoo\! news|ynet|ynet(?:news)|youtube\.com)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(zizhi tongjian|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(zizhi tongjian|)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(abc|bbc(?: radio| world)|cbs|cnn|fox|nbc)((?:|\.com|news\.com| news| news online| news \(australia\)|))\]\]", "$1$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(abc|bbc(?: radio| world)|cbs|cnn|fox|nbc)((?:|\.com|news\.com| news| news online| news \(australia\)|)\|([^\]]+?))\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ballantine|basic|ivy|penguin|stackpole) books)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ballantine|basic|ivy|penguin|stackpole) books)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(san francisco (?:chronicle|examiner))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(san francisco (?:chronicle|examiner))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((australian broadcasting|british broadcasting|) corporation)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((australian broadcasting|british broadcasting|) corporation)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((greenwood publishing|iraq survey|thales|) group)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((greenwood publishing|iraq survey|thales|) group)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((miami|new york|sydney morning|the sydney|the sydney morning|) herald)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((miami|new york|sydney morning|the sydney|the sydney morning|) herald)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:huffington|the huffington|jerusalem|the jerusalem|new york|the new york|washington|the washington|) post)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:huffington|the huffington|jerusalem|the jerusalem|new york|the new york|washington|the washington|) post)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:afghan islamic|associated|suny|university of california|university of chicago|university of michigan|university of nebraska|university of north carolina|university of oklahoma|university of pennsylvania|university of texas|university of toronto|wallflower|) press)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:afghan islamic|associated|suny|university of california|university of chicago|university of michigan|university of nebraska|university of north carolina|university of oklahoma|university of pennsylvania|university of texas|university of toronto|wallflower|) press)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:cornell|duke|harvard|indiana|louisiana state|manchester|melbourne|oxford|princeton|purdue|stanford|temple|texas a\&m|) university press)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:cornell|duke|harvard|indiana|louisiana state|manchester|melbourne|oxford|princeton|purdue|stanford|temple|texas a\&m|) university press)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((ian allen|osprey|schiffer|) publishing)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((ian allen|osprey|schiffer|) publishing)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((asia|canberra|chicago sun(?:\-|)|financial|herald and weekly|huntsville|japan|los angeles|new york|seattle|st\. petersburg|st petersburg|sunday|the los angeles|the new york|washington|) times)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((asia|canberra|chicago sun(?:\-|)|financial|herald and weekly|huntsville|japan|los angeles|new york|seattle|st\. petersburg|st petersburg|sunday|the los angeles|the new york|washington|) times)\|([^\]]+?)\]\]", "$3"); // // educational ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(a level|academic(?:s)|administration \(business\)|aeronautical engineer(?:ing|s|)|aerospace engineer(?:ing|s)|academia sinica|alpha delta phi|alumni|anthropology|applied sciences|apprentice(?:ship|)|assistant professor|associate(?:s|\'s|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(a level|academic(?:s)|administration \(business\)|aeronautical engineer(?:ing|s|)|aerospace engineer(?:ing|s)|academia sinica|alpha delta phi|alumni|anthropology|applied sciences|apprentice(?:ship|)|assistant professor|associate(?:s|\'s|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(b\.a\.|bachelor(?: of business administration|s|\'s)|bachelor of arts (?:arts|business administration|juris doctorate|medicine|philosophy|science|)|(?:balliol|new|) college\, oxford|bates college|british (?:film institute|library|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(b\.a\.|bachelor(?: of business administration|s|\'s)|bachelor of arts (?:arts|business administration|juris doctorate|medicine|philosophy|science|)|(?:balliol|new|) college\, oxford|bates college|british (?:film institute|library|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(cal alumni association|calculus|chemical engineering|city college of new york|civics|civil engineer(?:ing|s|)|collaboration|college|college of (?:william and mary|william & mary|)|continuing studies|cum laude)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(cal alumni association|calculus|chemical engineering|city college of new york|civics|civil engineer(?:ing|s|)|collaboration|college|college of (?:william and mary|william & mary|)|continuing studies|cum laude)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(dds|d\.d\.s\.|dictionary of (?:national biography|)|distance learning|doctor(?:s|al|ate)|doctor of (?:education|engineering|law|medicine|philosophy|)|dormitory)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(dds|d\.d\.s\.|dictionary of (?:national biography|)|distance learning|doctor(?:s|al|ate)|doctor of (?:education|engineering|law|medicine|philosophy|)|dormitory)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(education|encyclopedia britanica|engineering|english studies)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(education|encyclopedia britanica|engineering|english studies)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(faculty of arts|fellow|first aid|fraternal organization|fraternity)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(faculty of arts|fellow|first aid|fraternal organization|fraternity)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(graduate studies|great soviet encyclopedia)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(graduate studies|great soviet encyclopedia)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(harvard(?: medical school)|honorary(?: doctorate)|humanities|hydrography)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(harvard(?: medical school)|honorary(?: doctorate)|humanities|hydrography)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(independent school \(uk\)|interdisciplinary|international relations|ivy league)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(independent school \(uk\)|interdisciplinary|international relations|ivy league)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(john f\. kennedy school of government|juris doctor)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(john f\. kennedy school of government|juris doctor)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(kindergarten)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(kindergarten)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(lambda chi alpha|legal education|legum doctor|liberal (?:arts|education)|library of congress country studies|london school of economics|loyola university chicago)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(lambda chi alpha|legal education|legum doctor|liberal (?:arts|education)|library of congress country studies|london school of economics|loyola university chicago)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(magnate|marshall scholarship|master(?:s|\'s|)|master of arts (?:arts|business administration|juris doctorate|medicine|philosophy|science|)|master of arts \((?:oxbridge and dublin|postgraduate|scotland)\)|mechanical engineer(?:ing|s|)|missouri university of science and technology)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(magnate|marshall scholarship|master(?:s|\'s|)|master of arts (?:arts|business administration|juris doctorate|medicine|philosophy|science|)|master of arts \((?:oxbridge and dublin|postgraduate|scotland)\)|mechanical engineer(?:ing|s|)|missouri university of science and technology)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(national library of australia|north american harvard|north carolina state|nursing)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(national library of australia|north american harvard|north carolina state|nursing)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(open library|oxford (?:dictionary of byzantium|english dictionary|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(open library|oxford (?:dictionary of byzantium|english dictionary|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(phd of (?:arts|business administration|juris doctorate|medicine|philosophy|science|)|p\.h\.d of (?:arts|business administration|juris doctorate|medicine|philosophy|science|)|phi beta kappa|philosophy|political science|professional development|professor|public school \(government funded\))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(phd of (?:arts|business administration|juris doctorate|medicine|philosophy|science|)|p\.h\.d of (?:arts|business administration|juris doctorate|medicine|philosophy|science|)|phi beta kappa|philosophy|political science|professional development|professor|public school \(government funded\))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(research|rhodes scholarship)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(research|rhodes scholarship)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(scholar|school accreditation|school of law|smithsonian institution|social science|student|summa cum laude|surveying)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(scholar|school accreditation|school of law|smithsonian institution|social science|student|summa cum laude|surveying)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(tau kappa epsilon|the university of texas at austin|think tank|training|trinity (?:college\, cambridge|college\, dublin|house)|tsagi)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(tau kappa epsilon|the university of texas at austin|think tank|training|trinity (?:college\, cambridge|college\, dublin|house)|tsagi)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(undergraduate|university(?:\-preparatory school|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(undergraduate|university(?:\-preparatory school|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(university of (?:akron|alaska|antwerp|arizona|arkansas|berlin|bristol|california|california, (?:berkeley|davis|irvine|los angeles)|california at (?:berkeley|davis|irvine|los angeles)|cambridge|chicago|colorado|connecticut|dallas|delaware|denver|edinburgh|florida|georgia|glasgow|göttingen|hanover|hawaii|idaho|illinois|indiana|iowa|kansas|kentucky|london|louisiana|maine|manchester|maryland|massachusetts|melbourne|miami|miami school of law|michigan|minnesota|mississippi|missouri|montana|moscow|munich|nebraska|nevada|new (?:hampshire|jersey|mexico|york|)|north carolina|north carolina at chapel hill|north dakota|notre dame|ohio|oklahoma|oregon|ottawa|oxford|paris|pennsylvania|pittsburgh|puerto rico|rhode island|richmond|south carolina|south dakota|southern california|southern mississippi|st andrews|sussex|sydney|tennessee|texas|toledo|toronto|utah|vermont|virginia|washington|west virginia|wisconsin|wisconsin\-madison|wyoming|zagreb|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(university of (?:akron|alaska|antwerp|arizona|arkansas|berlin|bristol|california|california, (?:berkeley|davis|irvine|los angeles)|california at (?:berkeley|davis|irvine|los angeles)|cambridge|chicago|colorado|connecticut|dallas|delaware|denver|edinburgh|florida|georgia|glasgow|göttingen|hanover|hawaii|idaho|illinois|indiana|iowa|kansas|kentucky|london|louisiana|maine|manchester|maryland|massachusetts|melbourne|miami|miami school of law|michigan|minnesota|mississippi|missouri|montana|moscow|munich|nebraska|nevada|new (?:hampshire|jersey|mexico|york|)|north carolina|north carolina at chapel hill|north dakota|notre dame|ohio|oklahoma|oregon|ottawa|oxford|paris|pennsylvania|pittsburgh|puerto rico|rhode island|richmond|south carolina|south dakota|southern california|southern mississippi|st andrews|sussex|sydney|tennessee|texas|toledo|toronto|utah|vermont|virginia|washington|west virginia|wisconsin|wisconsin\-madison|wyoming|zagreb|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:the |)university of (?:akron|alaska|arizona|arkansas|berlin|california|cambridge|chicago|colorado|connecticut|delaware|denver|florida|georgia|hawaii|idaho|illinois|indiana|iowa|kansas|kentucky|louisiana|maine|maryland|maryland\, college park|massachusetts|miami|miami school of law|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new hampshire|new jersey|new mexico|new york|north carolina|north dakota|ohio|oklahoma|oregon|pennsylvania|puerto rico|rhode island|south carolina|south dakota|southern california|tennessee|texas|tokyo|toledo|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|))\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:the |)university of (?:akron|alaska|arizona|arkansas|berlin|california|cambridge|chicago|colorado|connecticut|delaware|denver|florida|georgia|hawaii|idaho|illinois|indiana|iowa|kansas|kentucky|louisiana|maine|maryland|maryland\, college park|massachusetts|miami|miami school of law|michigan|minnesota|mississippi|missouri|montana|nebraska|nevada|new hampshire|new jersey|new mexico|new york|north carolina|north dakota|ohio|oklahoma|oregon|pennsylvania|puerto rico|rhode island|south carolina|south dakota|southern california|tennessee|texas|tokyo|toledo|utah|vermont|virginia|washington|west virginia|wisconsin|wyoming|))\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alaska|american|arizona(?: state|)|arkansas(?: state|)|auburn|australian national|berlin|brigham young|brown|bucknell|butler|cairo|california(?: state|)|carleton|central methodist|chicago|clarkson|colorado(?: state|)|columbia|connecticut|delaware|denver|drexel|duke|durham|eastern washington|edinburgh|emory|fisk|florida(?: state|)|georgia|harvard|hawaii|howard|idaho(?: state|)|illinois|indiana(?: state|)|iowa(?: state|)|jagiellonian|johns hopkins|kansas(?: state|)|kentucky(?: state|)|louisiana(?: state| tech|)|loyola marymount|maine|marquette|maryland(?: state|)|massachusetts|mcgill|michigan(?: state|)|minnesota(?: state|)|mississippi(?: state|)|missouri|montana|) university)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alaska|american|arizona(?: state|)|arkansas(?: state|)|auburn|australian national|berlin|brigham young|brown|bucknell|butler|cairo|california(?: state|)|carleton|central methodist|chicago|clarkson|colorado(?: state|)|columbia|connecticut|delaware|denver|drexel|duke|durham|eastern washington|edinburgh|emory|fisk|florida(?: state|)|georgia|harvard|hawaii|howard|idaho(?: state|)|illinois|indiana(?: state|)|iowa(?: state|)|jagiellonian|johns hopkins|kansas(?: state|)|kentucky(?: state|)|louisiana(?: state| tech|)|loyola marymount|maine|marquette|maryland(?: state|)|massachusetts|mcgill|michigan(?: state|)|minnesota(?: state|)|mississippi(?: state|)|missouri|montana|) university)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:nanking|nebraska|nevada|new hampshire|new jersey|new mexico|new york|north carolina|north dakota(?: state)|northern illinois|northwestern|norwich|ohio(?: state|)|oklahoma(?: state|)|oregon(?: state|)|pennsylvania(?: state|)|pepperdine|pittsburg state|princeton|queen\'s|rice|rhode island|rutgers|south carolina|south dakota(?: state)|southern california|st\. ambrose|stetson|syracuse|taylor|tel aviv|tennessee|texas (?:a\&m|state|tech|)|truman state|tufts|upper iowa|utah|vanderbilt|vermont|virginia(?: state|)|virginia polytechnic institute and state|washington(?: state|)|weber state|webster|west virginia|wichita state|wisconsin|yale|york|) university)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:nanking|nebraska|nevada|new hampshire|new jersey|new mexico|new york|north carolina|north dakota(?: state)|northern illinois|northwestern|norwich|ohio(?: state|)|oklahoma(?: state|)|oregon(?: state|)|pennsylvania(?: state|)|pepperdine|pittsburg state|princeton|queen\'s|rice|rhode island|rutgers|south carolina|south dakota(?: state)|southern california|st\. ambrose|stetson|syracuse|taylor|tel aviv|tennessee|texas (?:a\&m|state|tech|)|truman state|tufts|upper iowa|utah|vanderbilt|vermont|virginia(?: state|)|virginia polytechnic institute and state|washington(?: state|)|weber state|webster|west virginia|wichita state|wisconsin|yale|york|) university)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(virginia tech)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(virginia tech)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(washington university in st\. louis|white paper)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(washington university in st\. louis|white paper)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ananda|boston|cheltenham|clifton|dartmouth|dulwich|eton|evansville|harvard|kenyon|marlborough|morehouse|scarritt|snow|spellman|washington \& jefferson|washington state|williams|winchester|yale|) college)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:ananda|boston|cheltenham|clifton|dartmouth|dulwich|eton|evansville|harvard|kenyon|marlborough|morehouse|scarritt|snow|spellman|washington \& jefferson|washington state|williams|winchester|yale|) college)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alaska|arizona|arkansas|berlin|california|colorado|connecticut|delaware|denver|florida|georgia|hawaii|idaho|illinois|indiana|iowa|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|) institute of technology)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:alaska|arizona|arkansas|berlin|california|colorado|connecticut|delaware|denver|florida|georgia|hawaii|idaho|illinois|indiana|iowa|kansas|kentucky|louisiana|maine|maryland|massachusetts|michigan|minnesota|mississippi|missouri|montana|) institute of technology)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:nebraska|nevada|new (?:england|hampshire|jersey|mexico|york|)|north carolina|north dakota|ohio|oklahoma|oregon|pennsylvania|rhode island|south carolina|south dakota|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|) institute of technology)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:nebraska|nevada|new (?:england|hampshire|jersey|mexico|york|)|north carolina|north dakota|ohio|oklahoma|oregon|pennsylvania|rhode island|south carolina|south dakota|tennessee|texas|utah|vermont|virginia|washington|west virginia|wisconsin|) institute of technology)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(([a-z]+) high school)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(([a-z]+) high school)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bootham|rumford|) high school)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:bootham|rumford|) high school)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:dumbarton|edinburgh|) academy)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:dumbarton|edinburgh|) academy)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:boarding|columbia law|common|elementary|finishing|george washington university law|graduate|groton|harrow|harvard law|high|independent|john burroughs|magnet|middle|parochial|private|religious|roman catholic|rugby|rush medical|state|westminster|yale law|) school)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((?:boarding|columbia law|common|elementary|finishing|george washington university law|graduate|groton|harrow|harvard law|high|independent|john burroughs|magnet|middle|parochial|private|religious|roman catholic|rugby|rush medical|state|westminster|yale law|) school)\|([^\]]+?)\]\]", "$2"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((associate(?:s|\'s|)|dds|d\.d\.s\.|doctor(?:s|al|ate)|honorary|master(?:s|\'s|)|bachelor(?:s|\'s|)|phd|p\.h\.d|)\s*degree)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[((associate(?:s|\'s|)|dds|d\.d\.s\.|doctor(?:s|al|ate)|honorary|master(?:s|\'s|)|bachelor(?:s|\'s|)|phd|p\.h\.d|)\s*degree)\|([^\]]+?)\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(associate(?:s|\'s|)|dds|d\.d\.s\.|doctor(?:s|al|ate| of philosophy|)|honorary|master(?:s|\'s|)|bachelor(?:s|\'s)|bachelor of science|ll\.m\.|phd|p\.h\.d)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(associate(?:s|\'s|)|dds|d\.d\.s\.|doctor(?:s|al|ate| of philosophy|)|honorary|master(?:s|\'s|)|bachelor(?:s|\'s)|bachelor of science|ll\.m\.|phd|p\.h\.d)\|([^\]]+?)\]\]", "$2"); // // Delink from Wiktionary (note piped Wikt link must be processed first below) ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(wikt\:([^\]]+?)\|([^\]]+?))\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[wikt\:([^\]]+?)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(wiktionary\:([^\]]+?)\|([^\]]+?))\]\]", "$3"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[wiktionary\:([^\]]+?)\]\]", "$1"); // //Temp just to be quick, I'll clean this up later ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(abbreviation|ad hoc|alternate history|automation|blacksmith|bodyguard|centenary|chart|chess|classical antiquity|courtesy name|curate|curfew|demolition|early warning|free french|hierarchy|international committee of the red cross|gps|hardness|kerosene|kilt|land rover|laurel wreath|mineral oil|motto|national historic landmark|nobel (?:prize|peace prize|)|obverse|obverse and reverse|octane|patent|piracy|pub|public house|quench|reinforced concrete|replica|sabotage|sanskrit|scouting|shore establishment|spelling alphabet|state funeral|tourist attraction|usgs|vandals|vassals|wade\-giles|world record|)\]\]", "$1"); ArticleText=Regex.Replace(ArticleText, @"(?i)\[\[(abbreviation|ad hoc|alternate history|automation|blacksmith|bodyguard|centenary|chart|chess|classical antiquity|courtesy name|curate|curfew|demolition|early warning|free french|hierarchy|international committee of the red cross|gps|hardness|kerosene}kilt|land rover|laurel wreath|mineral oil|motto|national historic landmark|nobel (?:prize|peace prize|)|obverse|obverse and reverse|octane|patent|piracy|pub|public house|quench|reinforced concrete|replica|sabotage|sanskrit|scouting|shore establishment|spelling alphabet|state funeral|tourist attraction|usgs|vandals|vassals|wade\-giles|world record|)\|([^\]]+?)\]\]", "$2"); return ht.AddBack(ArticleText); return ArticleText; }