Skip to content

Instantly share code, notes, and snippets.

@Zaidos
Created May 18, 2012 17:49
Show Gist options
  • Save Zaidos/2726696 to your computer and use it in GitHub Desktop.
Save Zaidos/2726696 to your computer and use it in GitHub Desktop.
Find GUID
private bool TryToFindGuid( string html, out string guid )
{
const string guidRegexString = @"[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}";
var match = Regex.Match( html, guidRegexString, RegexOptions.Compiled );
guid = match.Value;
return match.Success;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment