User:Monkbot/Task 5: CS1 deprecated coauthor parameters

Monkbot task 5 is a variant of the task 2 script. Like task 2, it is intended to pluck some of the low hanging fruit from Category:Pages containing cite templates with deprecated parameters.

This script replaces the deprecated Citation Style 1 parameters |coauthor= and |coauthors= (hereafter |coauthor=) with individual |authorn= parameters where n is a number 2–10. Task 5 operates on CS1 citations that have |coauthor= parameters that are lists of comma separated names where the names are in first-middle-last order.

Generally names in the |coauthor= parameter must have this form:

First Middle Middle Last
where First and Middle may be initials and may be followed by a period and where Middle is optional

The script has a one-way overlap with task 3. Task 5 can fix |coauthor= parameters where the list of names is comma separated Vancouver style. Task 5 cannot fix Vancouver style names where Last is hyphenated or contains an apostrophe, nor when the last initial is followed by a period (Last FM.). Task 3 cannot fix First-Middle-Last form names.

All or part of the last name in a multiname |coauthor= list may be et al (without terminal period), for example: First Last et al (a terminal period will not match because last names aren't typically terminated with a period).

When |coauthor= has only a single name, the script uses the same rule as task 2.

Task 5 will not change citations:

  • that have |ref=harv, which includes all {{citation}} templates because {{citation}} sets |ref=harv by default
  • where |coauthor= precedes |last=, |last1=, |author=, or |author1=
  • that contain |lastn= or |authorn= where n is greater than 1

Beyond the exceptions noted in §Ancillary tasks, task 5 does not evaluate, modify, or remove parameter values.

Ancillary tasks edit

This script also:

  1. adds |displayauthors=9 when replacement results in nine authors,
  2. removes Wikimarkup italics from ''et al.'' wherever this text occurs in CS1 citations because the wikimarkup contaminates the citation's COinS metadata and because et al. is properly not italicized (see Help:CS1; and cf., viz., & et al. at MOS:ABBR)
  3. removes empty |coauthor= parameters

To do list edit

  1. Remove terminal punctuation from |coauthor= list of names. Also from |author= and |authors=.

Script edit

<?xml version="1.0"?>
<!--

This script attempts to find and fix |coauthor=First M. Last, First Middle Last, F. M. Last, etc.  The requirements are
	1. First is a string of one or more letters. If one letter, that letter may be followed by a period.  First is required.
	2. Middle is a string of one or more letters. If one letter, that letter may be followed by a period. Optional.
	3. Middle2 is a string of one or more letters. If one letter, that letter may be followed by a period. Optional.
	4. Last is a continuous string of letters without spaces - names like those introduced by 'de' and the like are may be supported
	   depending on the number of middle names; may be hyphenated or contain an apostrophe.  Required
	5. Last must be followed by an optional space, a comma, and an optional space
	
The script isn't smart enough to to distinguish between the names it is designed to find and those names that are the type found by Task 3 (Vancouver).
This may be acceptable.  Some of the Vancouver style name won't be caught because hyphenated last names or names with apostrophes won't match.
Otherwise, Mataconi JL, or Mataconi JLB, or Mataconi J L B are all acceptable; Mataconi J. L. B. is not because of the terminal period.

Similarly, the script matches Last First Middle similar to task 4 but where editors have not included a comma between Last and First.

2014-04-12: Added (?&lt;!Jr|jr|III|iii|II|ii) to all multiname rules so that names like 'Clark Jr, Henry Austin' aren't fixed.
-->
<AutoWikiBrowserPreferences xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:space="preserve" Version="5.5.2.3">
  <Project>wikipedia</Project>
  <LanguageCode>en</LanguageCode>
  <CustomProject />
  <Protocol>http://</Protocol>
  <LoginDomain />
  <List>
    <ListSource>Category:Pages containing cite templates with deprecated parameters</ListSource>
    <SelectedProvider>CategoryListProvider</SelectedProvider>
    <ArticleList />
  </List>
  <FindAndReplace>
    <Enabled>true</Enabled>
    <IgnoreSomeText>false</IgnoreSomeText>
    <IgnoreMoreText>false</IgnoreMoreText>
    <AppendSummary>false</AppendSummary>
    <Replacements>
	  <!--
	  A bit of housekeeping before we start.  Many authors italicize et al. (|authorn=''et al.'') when it shouldn't be italicized because the Wikimarkup
	  corrupts the COinS metadata and because foreign words and phrases in common use in the English language aren't italicized.  So, here we find any instance
	  of ''et al.'' in a CS1 citation and remove the Wikimarkup.
	  
	  This rule must be enabled if coauthor lists ending in italicized ''et al.'' are to be repaired.
	  -->
      <Replacement>
        <Find>(\{\{\s*[Cc]ite\s*(?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|press release|sign|techreport|thesis|web)[^}]*)''et al(?:''\.?|\.?'')([^}]*\}\})</Find>
        <Replace>$1et al.$2</Replace>
        <Comment>Remove italics from et al.</Comment>
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>false</BeforeOrAfter>
        <RegularExpressionOptions>IgnoreCase</RegularExpressionOptions>
      </Replacement>
	  <!--
	  (1) protect any citations that have |ref=harv because adding |authorn= parameters will cause Module:Citation/CS1 to include the new author(s) in
	  the CITEREF anchor which will break existing links between {{sfn}} or {{harv}} short form citations.
	  
	  We protect a citation by inserting the unique string BoGuSNonMaTcHiNgStRiNg1 at the template's opening so it becomes: {{BoGuSNonMaTcHiNgStRiNg1cite ...
	  The template is no longer recognizable as a CS1 template which is what all of the remaining rules are looking for.
	  -->
      <Replacement>
        <Find>(\{\{\s*)([Cc]ite\s*(?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|press release|sign|techreport|thesis|web)[^}]*\|\s*ref\s*=\s*harv[^\|\}]*)</Find>
        <Replace>$1BoGuSNonMaTcHiNgStRiNg1$2</Replace>
        <Comment>Block edits to cites with |ref=harv occurring before |coauthor</Comment>
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>false</BeforeOrAfter>
        <RegularExpressionOptions>IgnoreCase</RegularExpressionOptions>
      </Replacement>
	  <!--
	  (2) protect any citations that have numbered |lastn= or |authorn= parameters where n is greater than 1.  I'm not clever enough to figure out
	  how to get AWB to start anywhere other than |author2=.
	  
	  If |authorn= is empty and follows |coauthor=, then the empty |authorn= will mask the set |authorn=.  Still, we should be able to simplify to a single rule
	  because this script only operates on citations where |coauthor= follows |lastn= or |authorn= (for n=nil or n=1).  So we really only need one rule to protect
	  citations with |lastn= or |authorn= (for n>1)
	  -->
      <Replacement>
        <Find>(\{\{\s*)([Cc]ite\s*(?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|press release|sign|techreport|thesis|web)[^}]*\|\s*(?:author|last)(?:[2-9]|\d\d)\s*=\s*\w[^\|\}]*)</Find>
        <Replace>$1BoGuSNonMaTcHiNgStRiNg1$2</Replace>
        <Comment>Block edits to cites with |lastn= or |authorn (where n>1) that occur before |coauthor</Comment>
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>false</BeforeOrAfter>
        <RegularExpressionOptions>IgnoreCase</RegularExpressionOptions>
      </Replacement>
	  <!--
	  The more-than-one-coauthor replacement rules (2 to 9 coauthors).
	  
	  These rules do not fix the |coauthor= without |author= violation.  For these rule, |last(1)= or |author(1)= or |authors= must precede |coauthor(s)=. Another
	  set of rules will be required to handle the case where |last(1)= or |author(1)= or |authors= are preceded by |coauthor(s)=.  This limitation was adopted
	  as a first step in getting the script approved for use by Monkbot.
	  
	  This script looks for citations that have |coauthor= parameters that are relatively First Middle Last style.
	  
	  Each name in |coauthor(s)= must be separated from the preceding name by an optional space, a required comma, and an optional space.  The last name in the list may be
	  separated from the rest of the list by an optional space, a required comma, an optional space followed by one of two optional 'and' or '&', and an optional space.
	  
	  The last name may be et al. (without italics markup - which is removed by the housekeeping rule).
	  -->
      <Replacement>
        <Find>(\{\{\s*[Cc]ite\s*(?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|press release|sign|techreport|thesis|web)[^}]*\|\s*(?:authors?|last)1?\s*=\s*[\w\[][^}]*)\|\s*coauthors?\s*=\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),(?:\s*and\b|\s*&amp;)?\s*((?:\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*|et al\.?))(\s*[\|\}][^}]*)</Find>
        <Replace>$1|author2=$2|author3=$3|author4=$4|author5=$5|author6=$6|author7=$7|author8=$8|author9=$9|author10=$10$11</Replace>
        <Comment>9 coauthors - author2, author3, author4, author5, author6, author7, author8, author9,[ &amp;| and] author10</Comment>
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>false</BeforeOrAfter>
        <RegularExpressionOptions>None</RegularExpressionOptions>
      </Replacement>
	  <!--
	  Nine authors, adds |displayauthors=9
	  -->
      <Replacement>
        <Find>(\{\{\s*[Cc]ite\s*(?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|press release|sign|techreport|thesis|web)[^}]*\|\s*(?:authors?|last)1?\s*=\s*[\w\[][^}]*)\|\s*coauthors?\s*=\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),(?:\s*and\b|\s*&amp;)?\s*((?:\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*|et al\.?))(\s*[\|\}][^}]*)</Find>
        <Replace>$1|author2=$2|author3=$3|author4=$4|author5=$5|author6=$6|author7=$7|author8=$8|author9=$9|displayauthors=9$10</Replace>
        <Comment>8 coauthors - author2, author3, author4, author5, author6, author7, author8,[ &amp;| and] author9</Comment>
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>false</BeforeOrAfter>
        <RegularExpressionOptions>None</RegularExpressionOptions>
      </Replacement>
      <Replacement>
        <Find>(\{\{\s*[Cc]ite\s*(?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|press release|sign|techreport|thesis|web)[^}]*\|\s*(?:authors?|last)1?\s*=\s*[\w\[][^}]*)\|\s*coauthors?\s*=\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),(?:\s*and\b|\s*&amp;)?\s*((?:\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*|et al\.?))(\s*[\|\}][^}]*)</Find>
        <Replace>$1|author2=$2|author3=$3|author4=$4|author5=$5|author6=$6|author7=$7|author8=$8$9</Replace>
        <Comment>7 coauthors - author2, author3, author4, author5, author6, author7,[ &amp;| and] author8</Comment>
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>false</BeforeOrAfter>
        <RegularExpressionOptions>None</RegularExpressionOptions>
      </Replacement>
      <Replacement>
        <Find>(\{\{\s*[Cc]ite\s*(?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|press release|sign|techreport|thesis|web)[^}]*\|\s*(?:authors?|last)1?\s*=\s*[\w\[][^}]*)\|\s*coauthors?\s*=\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),(?:\s*and\b|\s*&amp;)?\s*((?:\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*|et al\.?))(\s*[\|\}][^}]*)</Find>
        <Replace>$1|author2=$2|author3=$3|author4=$4|author5=$5|author6=$6|author7=$7$8</Replace>
        <Comment>6 coauthors - author2, author3, author4, author5, author6,[ &amp;| and] author7</Comment>
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>false</BeforeOrAfter>
        <RegularExpressionOptions>None</RegularExpressionOptions>
      </Replacement>
      <Replacement>
        <Find>(\{\{\s*[Cc]ite\s*(?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|press release|sign|techreport|thesis|web)[^}]*\|\s*(?:authors?|last)1?\s*=\s*[\w\[][^}]*)\|\s*coauthors?\s*=\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),(?:\s*and\b|\s*&amp;)?\s*((?:\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*|et al\.?))(\s*[\|\}][^}]*)</Find>
        <Replace>$1|author2=$2|author3=$3|author4=$4|author5=$5|author6=$6$7</Replace>
        <Comment>5 coauthors - author2, author3, author4, author5,[ &amp;| and] author6</Comment>
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>false</BeforeOrAfter>
        <RegularExpressionOptions>None</RegularExpressionOptions>
      </Replacement>
      <Replacement>
        <Find>(\{\{\s*[Cc]ite\s*(?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|press release|sign|techreport|thesis|web)[^}]*\|\s*(?:authors?|last)1?\s*=\s*[\w\[][^}]*)\|\s*coauthors?\s*=\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),(?:\s*and\b|\s*&amp;)?\s*((?:\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*|et al\.?))(\s*[\|\}][^}]*)</Find>
        <Replace>$1|author2=$2|author3=$3|author4=$4|author5=$5$6</Replace>
        <Comment>4 coauthors - author2, author3, author4,[ &amp;| and] author5</Comment>
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>false</BeforeOrAfter>
        <RegularExpressionOptions>None</RegularExpressionOptions>
      </Replacement>
      <Replacement>
        <Find>(\{\{\s*[Cc]ite\s*(?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|press release|sign|techreport|thesis|web)[^}]*\|\s*(?:authors?|last)1?\s*=\s*[\w\[][^}]*)\|\s*coauthors?\s*=\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*),(?:\s*and\b|\s*&amp;)?\s*((?:\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*|et al\.?))(\s*[\|\}][^}]*)</Find>
        <Replace>$1|author2=$2|author3=$3|author4=$4$5</Replace>
        <Comment>3 coauthors - author2, author3,[ &amp;| and] author4</Comment>
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>false</BeforeOrAfter>
        <RegularExpressionOptions>None</RegularExpressionOptions>
      </Replacement>
      <Replacement>
        <Find>(\{\{\s*[Cc]ite\s*(?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|press release|sign|techreport|thesis|web)[^}]*\|\s*(?:authors?|last)1?\s*=\s*[\w\[][^}]*)\|\s*coauthors?\s*=\s*(\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*)(?&lt;!Jr|jr|III|iii|II|ii),(?:\s*and\b|\s*&amp;)?\s*((?:\w+\b\.?\s+\w*\b\.?\s*\w*\b\.?\s*[\w'-]+\b\s*|et al\.?))(\s*[\|\}][^}]*)</Find>
        <Replace>$1|author2=$2|author3=$3$4</Replace>
        <Comment>2 coauthors - author2,[ &amp;| and] author3</Comment>
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>false</BeforeOrAfter>
        <RegularExpressionOptions>None</RegularExpressionOptions>
      </Replacement>
	  <!--
	  The one coauthor rule. Different from the other rules, this rule expects the name to be composed of up to four parts. The first part may be separated
	  from the others by an optional comma.  All parts may contain letters, hyphens or periods.  Optionally, the collective name may be preceded by one of these:
	  'and', 'with', or '&'.
	  -->
      <Replacement>
        <Find>(\{\{\s*[Cc]ite\s*(?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|press release|sign|techreport|thesis|web)[^}]*\|\s*(?:authors?|last)1?\s*=\s*[\w\[][^}]*)\|\s*coauthors?\s*=\s*(?:and\b|with\b|&amp;)?\s*([a-z\.,-]+\s*[\w\.-]*\s*[\w\.-]*\s*[\w\.-]*)(\s*[\|\}][^}]*)</Find>
        <Replace>$1|author2=$2$3</Replace>
        <Comment>1 coauthor - author2</Comment>
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>false</BeforeOrAfter>
        <RegularExpressionOptions>IgnoreCase</RegularExpressionOptions>
      </Replacement>
	  <!--
	  If |coauthor(s)= is empty, remove it.  Don't know if I should make separate rules for |coauthor= and |coauthors=.
	  -->
      <Replacement>
        <Find>(\{\{\s*(?:[Cc]ite (?:(?:AV media(?! notes))|book|conference|encyclopedia|journal|(?:news(?!group|paper))|press release|sign|techreport|thesis|web)|[Cc]itation[^}]+\s*)[^}]*?)\|\s*coauthors?\s*=\s*([\|\}][^}]*)</Find>
        <Replace>$1$2</Replace>
        <Comment>Empty</Comment>
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>false</BeforeOrAfter>
        <RegularExpressionOptions>IgnoreCase</RegularExpressionOptions>
      </Replacement>
	  <!--
	  This is the last step of the conversion process.  Once all of the other rules have run, if we protected any citations by adding BoGuSNonMaTcHiNgStRiNg1
	  to them, search for that string and replace it with nothing.
	  -->
      <Replacement>
        <Find>(\{\{\s*)BoGuSNonMaTcHiNgStRiNg1([Cc]ite)</Find>
        <Replace>$1$2</Replace>
        <Comment>Restore protected cites</Comment>
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>false</BeforeOrAfter>
        <RegularExpressionOptions>IgnoreCase</RegularExpressionOptions>
      </Replacement>
	  </Replacements>
    <AdvancedReps />
    <SubstTemplates />
    <IncludeComments>false</IncludeComments>
    <ExpandRecursively>true</ExpandRecursively>
    <IgnoreUnformatted>false</IgnoreUnformatted>
  </FindAndReplace>
  <Editprefs>
    <GeneralFixes>false</GeneralFixes>
    <Tagger>false</Tagger>
    <Unicodify>false</Unicodify>
    <Recategorisation>0</Recategorisation>
    <NewCategory />
    <NewCategory2 />
    <ReImage>0</ReImage>
    <ImageFind />
    <Replace />
    <SkipIfNoCatChange>false</SkipIfNoCatChange>
    <RemoveSortKey>false</RemoveSortKey>
    <SkipIfNoImgChange>false</SkipIfNoImgChange>
    <AppendText>false</AppendText>
    <AppendTextMetaDataSort>false</AppendTextMetaDataSort>
    <Append>true</Append>
    <Text />
    <Newlines>2</Newlines>
    <AutoDelay>5</AutoDelay>
    <BotMaxEdits>500</BotMaxEdits>
    <SupressTag>true</SupressTag>
    <RegexTypoFix>false</RegexTypoFix>
  </Editprefs>
  <General>
    <AutoSaveEdit>
      <Enabled>false</Enabled>
      <SavePeriod>30</SavePeriod>
      <SaveFile />
    </AutoSaveEdit>
    <SelectedSummary>Task 5: Fix [[Help:CS1_errors#deprecated_params|CS1 deprecated coauthor parameter errors]] ([[Wikipedia:Bots/Requests for approval/Monkbot 5|bot trial]])</SelectedSummary>
    <Summaries>
      <string>clean up</string>
      <string>re-categorisation per [[WP:CFD|CFD]]</string>
      <string>clean up and re-categorisation per [[WP:CFD|CFD]]</string>
      <string>removing category per [[WP:CFD|CFD]]</string>
      <string>[[Wikipedia:Template substitution|subst:'ing]]</string>
      <string>[[Wikipedia:WikiProject Stub sorting|stub sorting]]</string>
      <string>[[WP:AWB/T|Typo fixing]]</string>
      <string>bad link repair</string>
      <string>Fixing [[Wikipedia:Disambiguation pages with links|links to disambiguation pages]]</string>
      <string>Unicodifying</string>
      <string>Task 5: Fix [[Help:CS1_errors#deprecated_params|CS1 deprecated coauthor parameter errors]]</string>
    </Summaries>
    <PasteMore>
      <string />
      <string />
      <string />
      <string />
      <string />
      <string />
      <string />
      <string />
      <string />
      <string />
    </PasteMore>
    <FindText />
    <FindRegex>true</FindRegex>
    <FindCaseSensitive>false</FindCaseSensitive>
    <WordWrap>true</WordWrap>
    <ToolBarEnabled>false</ToolBarEnabled>
    <BypassRedirect>true</BypassRedirect>
    <AutoSaveSettings>false</AutoSaveSettings>
    <noSectionEditSummary>false</noSectionEditSummary>
    <restrictDefaultsortAddition>true</restrictDefaultsortAddition>
    <restrictOrphanTagging>true</restrictOrphanTagging>
    <noMOSComplianceFixes>false</noMOSComplianceFixes>
    <syntaxHighlightEditBox>false</syntaxHighlightEditBox>
    <highlightAllFind>false</highlightAllFind>
    <PreParseMode>false</PreParseMode>
    <NoAutoChanges>false</NoAutoChanges>
    <OnLoadAction>0</OnLoadAction>
    <DiffInBotMode>false</DiffInBotMode>
    <Minor>true</Minor>
    <AddToWatchlist>2</AddToWatchlist>
    <TimerEnabled>false</TimerEnabled>
    <SortListAlphabetically>false</SortListAlphabetically>
    <AddIgnoredToLog>false</AddIgnoredToLog>
    <EditToolbarEnabled>true</EditToolbarEnabled>
    <filterNonMainSpace>false</filterNonMainSpace>
    <AutoFilterDuplicates>false</AutoFilterDuplicates>
    <FocusAtEndOfEditBox>false</FocusAtEndOfEditBox>
    <scrollToUnbalancedBrackets>false</scrollToUnbalancedBrackets>
    <TextBoxSize>10</TextBoxSize>
    <TextBoxFont>Courier New</TextBoxFont>
    <LowThreadPriority>false</LowThreadPriority>
    <Beep>false</Beep>
    <Flash>false</Flash>
    <Minimize>false</Minimize>
    <LockSummary>false</LockSummary>
    <SaveArticleList>true</SaveArticleList>
    <SuppressUsingAWB>false</SuppressUsingAWB>
    <AddUsingAWBToActionSummaries>false</AddUsingAWBToActionSummaries>
    <IgnoreNoBots>false</IgnoreNoBots>
    <ClearPageListOnProjectChange>false</ClearPageListOnProjectChange>
    <SortInterWikiOrder>true</SortInterWikiOrder>
    <ReplaceReferenceTags>true</ReplaceReferenceTags>
    <LoggingEnabled>true</LoggingEnabled>
    <AlertPreferences />
  </General>
  <SkipOptions>
    <SkipNonexistent>true</SkipNonexistent>
    <Skipexistent>false</Skipexistent>
    <SkipWhenNoChanges>false</SkipWhenNoChanges>
    <SkipSpamFilterBlocked>true</SkipSpamFilterBlocked>
    <SkipInuse>true</SkipInuse>
    <SkipWhenOnlyWhitespaceChanged>false</SkipWhenOnlyWhitespaceChanged>
    <SkipOnlyGeneralFixChanges>true</SkipOnlyGeneralFixChanges>
    <SkipOnlyMinorGeneralFixChanges>false</SkipOnlyMinorGeneralFixChanges>
    <SkipOnlyCasingChanged>false</SkipOnlyCasingChanged>
    <SkipIfRedirect>false</SkipIfRedirect>
    <SkipIfNoAlerts>false</SkipIfNoAlerts>
    <SkipDoes>false</SkipDoes>
    <SkipDoesNot>false</SkipDoesNot>
    <SkipDoesText />
    <SkipDoesNotText />
    <Regex>false</Regex>
    <CaseSensitive>false</CaseSensitive>
    <AfterProcessing>false</AfterProcessing>
    <SkipNoFindAndReplace>true</SkipNoFindAndReplace>
    <SkipMinorFindAndReplace>false</SkipMinorFindAndReplace>
    <SkipNoRegexTypoFix>false</SkipNoRegexTypoFix>
    <SkipNoDisambiguation>false</SkipNoDisambiguation>
    <SkipNoLinksOnPage>false</SkipNoLinksOnPage>
    <GeneralSkipList />
  </SkipOptions>
  <Module>
    <Enabled>false</Enabled>
    <Language>C# 2.0</Language>
    <Code>        public string ProcessArticle(string ArticleText, string ArticleTitle, int wikiNamespace, out string Summary, out bool Skip)
        {
            Skip = false;
            Summary = "test";
 
            ArticleText = "test \r\n\r\n" + ArticleText;
 
            return ArticleText;
        }</Code>
  </Module>
  <ExternalProgram>
    <Enabled>false</Enabled>
    <Skip>false</Skip>
    <Program />
    <Parameters />
    <PassAsFile>true</PassAsFile>
    <OutputFile />
  </ExternalProgram>
  <Disambiguation>
    <Enabled>false</Enabled>
    <Link />
    <Variants />
    <ContextChars>20</ContextChars>
  </Disambiguation>
  <Special>
    <namespaceValues>
      <int>0</int>
    </namespaceValues>
    <remDupes>true</remDupes>
    <sortAZ>true</sortAZ>
    <filterTitlesThatContain>false</filterTitlesThatContain>
    <filterTitlesThatContainText />
    <filterTitlesThatDontContain>false</filterTitlesThatDontContain>
    <filterTitlesThatDontContainText />
    <areRegex>false</areRegex>
    <opType>0</opType>
    <remove />
  </Special>
  <Tool>
    <ListComparerUseCurrentArticleList>0</ListComparerUseCurrentArticleList>
    <ListSplitterUseCurrentArticleList>0</ListSplitterUseCurrentArticleList>
    <DatabaseScannerUseCurrentArticleList>0</DatabaseScannerUseCurrentArticleList>
  </Tool>
  <Plugin />
</AutoWikiBrowserPreferences>