DbgShell/HostUtilities.cs
/// <summary>
/// Remove the GUID from the message if the message is in the pre-defined format
/// </summary>
/// <param name="message"></param>
/// <param name="matchPattern"></param>
/// <returns></returns>
Remove the GUID from the message if the message is in the pre-defined format
Remove the GUID from the message if the message is in the pre - defined format
internal static string RemoveGuidFromMessage(string message, out bool matchPattern)
        {
            matchPattern = false;
            if (String.IsNullOrEmpty(message))
                return message;
            const string pattern = @"^([\d\w]{8}\-[\d\w]{4}\-[\d\w]{4}\-[\d\w]{4}\-[\d\w]{12}:).*";
            Match matchResult = Regex.Match(message, pattern);
            if (matchResult.Success)
            {
                string partToRemove = matchResult.Groups[1].Captures[0].Value;
                message = message.Remove(0, partToRemove.Length);
                matchPattern = true;
            }
            return message;
        }
internal static string RemoveGuidFromMessage ( string message , out bool matchPattern ) { matchPattern = false ; if ( String . IsNullOrEmpty ( message ) ) return message ; const string pattern = @"^([\d\w]{8}\-[\d\w]{4}\-[\d\w]{4}\-[\d\w]{4}\-[\d\w]{12}:).*" ; Match matchResult = Regex . Match ( message , pattern ) ; if ( matchResult . Success ) { string partToRemove = matchResult . Groups [ 1 ] . Captures [ 0 ] . Value ; message = message . Remove ( 0 , partToRemove . Length ) ; matchPattern = true ; } return message ; }
Remove the GUID from the message if the message is in the pre-defined format
Remove the GUID from the message if the message is in the pre - defined format
None
message
string
None
bool
out
matchPattern
None