using System.Text.RegularExpressions;
using System.Collections.Generic;
public static void Main()
var testCases = new List<string>
"CHAS Care Assessment Adv H&S",
"CHAS Care Assessment Stand H&S",
"CHAS Care DeemedtoSatisfy Adv H&S",
"CHAS Care DeemedtoSatisfy Stand H&S",
"CHAS ContrConstruct Assessment Adv H&S",
"CHAS ContrConstruct Assessment Stand H&S",
"CHAS ContrConstruct DeemedtoSatisfy Adv H&S",
"CHAS ContrConstruct DeemedtoSatisfy Stand H&S",
"CHAS ContrNonConstruct Assessment Adv H&S",
"CHAS ContrNonConstruct Assessment Stand H&S",
"CHAS ContrNonConstruct DeemedtoSatisfy Adv H&S",
"CHAS ContrNonConstruct DeemedtoSatisfy Stand H&S",
"CHAS Designer Assessment Adv H&S",
"CHAS Designer Assessment Stand H&S",
"CHAS Designer DeemedtoSatisfy Adv H&S",
"CHAS Designer DeemedtoSatisfy Stand H&S",
"CHAS Elite Bundle UK - Bundle 1",
"CHAS Elite Bundle UK - Bundle 2",
"CHAS Elite Bundle UK - Bundle 3",
"CHAS General Assessment AS FIR",
"CHAS General Assessment Elite H&S",
"CHAS General Assessment Stand ENV",
"CHAS General SelfCertify Stand INS",
"CHAS General SelfCertify SVAL1 SVAL",
"CHAS General Verification Adv ABC",
"CHAS General Verification Adv C&PS",
"CHAS General Verification Adv ENV",
"CHAS General Verification Adv EO&D",
"CHAS General Verification Adv F&BS",
"CHAS General Verification Adv ID",
"CHAS General Verification Adv INS",
"CHAS General Verification Adv MS",
"CHAS General Verification Adv QUAL",
"CHAS General Verification VAN VCS",
"CHAS General Verification VC VCS",
"CHAS PrincipalContr Assessment Adv H&S",
"CHAS PrincipalContr Assessment Stand H&S",
"CHAS PrincipalContr DeemedtoSatisfy Adv H&S",
"CHAS PrincipalContr DeemedtoSatisfy Stand H&S",
"CHAS PrincipalDesigner Assessment Adv H&S",
"CHAS PrincipalDesigner Assessment Stand H&S",
"CHAS PrincipalDesigner DeemedtoSatisfy Adv H&S",
"CHAS PrincipalDesigner DeemedtoSatisfy Stand H&S",
"CHAS Verified Supplier UK"
foreach (var verificationTypeName in testCases)
var friendlyName = GetFriendlyName(verificationTypeName);
Console.WriteLine(friendlyName);
public static string GetFriendlyName(string verificationTypeName)
var friendlyName = verificationTypeName
.Replace("ContrConstruct", "Contractor Construction")
.Replace("ContrNonConstruct", "Contractor Non-Construction")
.Replace("PrincipalContr", "Principal Contractor")
.Replace("PrincipalDesigner", "Principle Designer")
.Replace("DeemedtoSatisfy", "Deemed to Satisfy")
.Replace("SelfCertify", "Self Certify")
.Replace("Stand", "Standard")
.Replace("Adv", "Advanced")
.Replace("H&S", "Health & Safety")
.Replace("ENV", "Environmental")
.Replace("INS", "Insurance")
.Replace("SVAL", "Social Value")
.Replace("ABC", "Anti-Bribery and Corruption")
.Replace("C&PS", "Corporate & Professional Standing")
.Replace("EO&D", "Equality Diversity and Inclusion")
.Replace("F&BS", "Financial")
.Replace("ID", "Identity")
.Replace("INS", "Insurance")
.Replace("MS", "Modern Slavery")
.Replace("QUAL", "Quality")
.Replace("VCS", "Vehicle Compliance Scheme")
.Replace("VAN", "Vehicle Compliance Scheme")
.Replace("General", string.Empty);
if (friendlyName.Contains("Bundle"))
friendlyName = MoveLevelText(friendlyName, "Standard");
friendlyName = MoveLevelText(friendlyName, "Advanced");
friendlyName = MoveLevelText(friendlyName, "Elite");
friendlyName = MoveLevelText(friendlyName, "Vehicle Compliance Scheme");
friendlyName = MoveTypeText(friendlyName, "Assessment");
friendlyName = MoveTypeText(friendlyName, "Verification");
friendlyName = MoveTypeText(friendlyName, "Self");
friendlyName = Regex.Replace(friendlyName, @"\s+", " ");
public static string MoveLevelText(string friendlyName, string level)
if (friendlyName.Contains(level))
friendlyName = friendlyName.Replace(level, string.Empty).Replace("CHAS", "CHAS " + level);
public static string MoveTypeText(string friendlyName, string type)
if (friendlyName.Contains(type))
friendlyName = friendlyName.Replace(type, string.Empty) + " " + type;