public void StandartizeQSO() { IsValid = false; IsIsraeli = HolyLogParser.IsIsraeliStation(DXCall); Hash(); string pattern = @"([a-zA-Z]{1,2})[-/\\_ ]*([0-9]{1,2})[-/\\_ ]*([a-zA-Z]{2})"; Regex regex = new Regex(pattern, RegexOptions.IgnoreCase); if (!string.IsNullOrWhiteSpace(SRX))//srx not empty -> good, try match { Match match = regex.Match(SRX); if (match.Success) //srx matches grid { this.SRX = match.Groups[1].Value + match.Groups[2].Value + match.Groups[3].Value; IsValid = IsValidCall() && IsValidBand() && IsValidMode() && IsValidSRX() && IsValidDXCC() && IsIsraeli; } else //srx does NOT matche grid { pattern = @"(\d+)"; regex = new Regex(pattern, RegexOptions.IgnoreCase); match = regex.Match(SRX); if (match.Success) { this.SRX = match.Groups[1].Value; IsValid = IsValidCall() && IsValidBand() && IsValidMode() && IsValidSRX() && IsValidDXCC() && !IsIsraeli; } else { IsValid = false; } } } else { IsValid = false; } }