I need to parse through a string and add single quotes around each Guid value. I was thinking I could use a Regex to do this but I\'m not exactly a Regex guru.
Is
You can easily auto-generate the C# code using: http://regexhero.net/tester/.
Its free.
Here is how I did it:
The website then auto-generates the .NET code:
string strRegex = @"\b[A-F0-9]{8}(?:-[A-F0-9]{4}){3}-[A-F0-9]{12}\b";
Regex myRegex = new Regex(strRegex, RegexOptions.None);
string strTargetString = @" {CD73FAD2-E226-4715-B6FA-14EDF0764162}.Debug|x64.ActiveCfg = Debug|x64";
string strReplace = @"""$0""";
return myRegex.Replace(strTargetString, strReplace);