@model System.Collections.Generic.KeyValuePair @using System.Text.RegularExpressions @{ var emailMatch = Regex.Match(Model.Value, @"^(?.+)\s?<(?
.+@.+)>$"); if (!emailMatch.Success) { emailMatch = Regex.Match(Model.Value, @"^(?
.+@.+)$"); } } @if (emailMatch.Success) { var emailAddress = emailMatch.Groups["address"].Value; var emailName = emailAddress; if (emailMatch.Groups["name"].Success) { emailName = emailMatch.Groups["name"].Value; } @emailName } else { @Model.Value }