Regex
パターンを使用してGUIDを取得する場合。次に、このパターンを試してください
(\{){0,1}[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}(\}){0,1}
例
string findGuid = "hi sdkfj 1481de3f-281e-9902-f98b-31e9e422431f sdfsf 1481de3f-281e-9902-f98b-31e9e422431f"; //Initialize a new string value
MatchCollection guids = Regex.Matches(findGuid, @"(\{){0,1}[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}(\}){0,1}"); //Match all substrings in findGuid
for (int i = 0; i < guids.Count; i++)
{
string Match = guids[i].Value; //Set Match to the value from the match
MessageBox.Show(Match); //Show the value in a messagebox (Not required)
}

注意:私はあなたが提供したのと同じパターンを使用しましたが^
、式が文字列の先頭から一致しなければならないことを示す文字を単に削除しました。$
次に、式が文字列の末尾から一致する必要があることを示す文字を削除しました。
正規表現の詳細については、次を参照してください。
正規表現-簡単なユーザーガイドとチュートリアル
ありがとう、
これがお役に立てば幸いです:)