Getting super picky about regex

This commit is contained in:
RogueException
2015-10-25 05:00:14 -03:00
parent cb747a2095
commit fc35717539

View File

@@ -6,8 +6,8 @@ namespace Discord
{
public static class Mention
{
private static readonly Regex _userRegex = new Regex(@"<@(?:\d+?)>", RegexOptions.Compiled);
private static readonly Regex _channelRegex = new Regex(@"<#(?:\d+?)>", RegexOptions.Compiled);
private static readonly Regex _userRegex = new Regex(@"<@(?:[0-9]+?)>", RegexOptions.Compiled);
private static readonly Regex _channelRegex = new Regex(@"<#(?:[0-9]+?)>", RegexOptions.Compiled);
/// <summary> Returns the string used to create a user mention. </summary>
public static string User(User user)