using System.Text.RegularExpressions; namespace MRBot.Extensions { public static class StringExtensionMethods { private static readonly Regex TrailingRomanNumeralRegex = new Regex(@"\s+[IVX]+$", RegexOptions.Compiled); public static string RemoveRomanNumeralsFromEnd(this string lhs) { return TrailingRomanNumeralRegex.Replace(lhs, ""); } } }