Skip to content

Instantly share code, notes, and snippets.

@kingofnull
Last active May 14, 2022 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kingofnull/ee7bce44377b960be405fc696adb27b0 to your computer and use it in GitHub Desktop.
Save kingofnull/ee7bce44377b960be405fc696adb27b0 to your computer and use it in GitHub Desktop.
C# Regex Capturing Group
var m = Regex.Match(data, @"[*D](?<num>\d+)[C#]");
if (m.Success)
{
var num = m.Groups["num"].Value;
Log($"New Phone Detected: {num}");
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment