title: Find .NET Recognizable Guids in a String
body: <p>I am looking for a way to find a Guid within a string that is in a .NET recognizable pattern. </p>
  
  <p>There are a few regex's available in this <a href="http://www.regexlib.com/Search.aspx?k=guid&amp;c=-1&amp;m=5&amp;ps=100" rel="nofollow">popular library</a>, but I can't find one that works for all of the possible Guids outlined here in this <a href="http://msdn.microsoft.com/en-us/library/96ff78dc.aspx" rel="nofollow">MSDN article</a>.</p>
  
  <p>For example, lets say I have a string like this: </p>
  
  <blockquote>
    <p>ACTIVITY: "{0xCA761232, 0xED42, 0x11CE, {0xBA, 0xCD, 0x00, 0xAA, 0x00, 0x57, 0xB2, 0x23}}", Time:09:09:09:09</p>
  </blockquote>
  
  <p>This should return: </p>
  
  <blockquote>
    <p>{0xCA761232, 0xED42, 0x11CE, {0xBA, 0xCD, 0x00, 0xAA, 0x00, 0x57, 0xB2, 0x23}}</p>
  </blockquote>
  
  <p>Another example could be:</p>
  
  <blockquote>
    <p>Random string CA761232-ED42-11CE-BACD-00AA0057B223 random string</p>
  </blockquote>
  
  <p>This should return:</p>
  
  <blockquote>
    <p>CA761232-ED42-11CE-BACD-00AA0057B223</p>
  </blockquote>
  
  <p>Any ideas on how to approach this? Is regular expressions the way to go here?</p>