public override ParseResult TryParse(string input)
{
ParseResult retval;
string pattern = @"/whowas\s+(?<nickname>[^\s]+)(\s+(?<limit>[0-9]+))?";
Regex regex = new Regex(pattern, RegexOptions.IgnoreCase);
Match match = regex.Match(input);
if (match.Success)
{
if (match.Groups["limit"].Success)
{
this.Parameters = new string[] { match.Groups["nickname"].Value, match.Groups["limit"].Value };
}
else
{
this.Parameters = new string[] { match.Groups["nickname"].Value };
}
retval = new ParseResult(true, string.Empty);
}
else
{
retval = new ParseResult(false, Strings_MessageParseResults.MissingParameter_Nickname);
}
return retval;
}