using System.Text.RegularExpressions;
private static Regex slackSubRegex = new Regex(@"^oauth2\|slack|(T.+)-(U.+)$", RegexOptions.Compiled);
public static void Main()
var match = slackSubRegex.Match("oauth2|slack|T0xxxxxxxxx-U0xxxxxxxxx");
Console.WriteLine(match.Captures.Count);
Console.WriteLine(match.Groups[1]);