Wikipedia:Projekt DotNetWikiBot Framework/GameOnBot/Syntaxfel/088 - Defaultsort starts with a space

//Originally made by sv:Användare:GameOn in 2011
using System;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections;
using System.Xml;
using DotNetWikiBot;
using System.Threading;
using System.Net;
using System.Web;

class MyBot : Bot
{
	public static void Main()
	{
		Site     site                = new Site(wiki, username, password);
		String   editCommentStr      = "Fixing syntax error 088: Defaultsort starts with a space";
		String   orgStr;
		PageList pl                  = new PageList(site);

		pl.FillFromFile("test1.txt");
		pl.FilterNamespaces(new int[] {0});
		foreach(Page myPage in pl)
		{
			myPage.Load();
			orgStr = myPage.text;
			myPage.text = myPage.text.Replace("{{DEFAULTSORT: ", "{{DEFAULTSORT:");
//			myPage.text = myPage.text.Replace("{{STANDARDSORTERING: ", "{{STANDARDSORTERING:");
			if(myPage.text != orgStr)
			{
				myPage.Save(myPage.text, editCommentStr, true);
				Thread.Sleep(60000);
			}
		}
	}
}