public bool IsIdHeader(ProcessOutputLineItem lineItem) { string firstPhrase = this.GetId(lineItem); string pattern = @"^(\d+)\)"; Regex regEx = new Regex(pattern, RegexOptions.IgnoreCase); bool isMatch = regEx.IsMatch(firstPhrase); return isMatch; }