Instantly share code, notes, and snippets.

anonymous /WikiHello.cs
Created Aug 30, 2017

Embed
What would you like to do?
using System;
using System.Net;
using System.Text.RegularExpressions;
namespace WikiHello
{
class WikiHello
{
static void Main(string[] args)
{
Console.WriteLine();
Console.Write("[");
string s = new WebClient().DownloadString(
"https://test.wikipedia.org/w/api.php?" +
"action=query&format=xml&prop=revisions&titles=User%3AVort%2FHello&rvprop=content");
Console.Write(Regex.Match(s, "e\">([^<]+)</r").Groups[1].Value);
Console.WriteLine("]");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment