14 lines
411 B
C#
14 lines
411 B
C#
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, "");
|
|
}
|
|
}
|
|
} |