using System;
using System.Text.RegularExpressions;
public class Test
{
public static void Main()
{
string nome0 = "0 - MARIA APARECIDA DE SOUZA MOURA 636598241";
string nome1 = "1 - MARIA APARECIDA DE SOUZA MOURA 2018";
string nome2 = "2 - MARIA APARECIDA DE SOUZA 636598241 MOURA";
string strRegex = "(\\s[0-9]{5,})+$";
string resu0 = Regex.Replace(nome0, strRegex, "");
string resu1 = Regex.Replace(nome1, strRegex, "");
string resu2 = Regex.Replace(nome2, strRegex, "");
Console.WriteLine(resu0);
Console.WriteLine(resu1);
Console.WriteLine(resu2);
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uVGV4dC5SZWd1bGFyRXhwcmVzc2lvbnM7CgpwdWJsaWMgY2xhc3MgVGVzdAp7CglwdWJsaWMgc3RhdGljIHZvaWQgTWFpbigpCgl7CgkgICAgc3RyaW5nIG5vbWUwID0gIjAgLSBNQVJJQSBBUEFSRUNJREEgREUgU09VWkEgTU9VUkEgNjM2NTk4MjQxIjsKCSAgICBzdHJpbmcgbm9tZTEgPSAiMSAtIE1BUklBIEFQQVJFQ0lEQSBERSBTT1VaQSBNT1VSQSAyMDE4IjsKCSAgICBzdHJpbmcgbm9tZTIgPSAiMiAtIE1BUklBIEFQQVJFQ0lEQSBERSBTT1VaQSA2MzY1OTgyNDEgTU9VUkEiOwoJCgkgICAgc3RyaW5nIHN0clJlZ2V4ID0gIihcXHNbMC05XXs1LH0pKyQiOwoJCgkgICAgc3RyaW5nIHJlc3UwID0gUmVnZXguUmVwbGFjZShub21lMCwgc3RyUmVnZXgsICIiKTsKCSAgICBzdHJpbmcgcmVzdTEgPSBSZWdleC5SZXBsYWNlKG5vbWUxLCBzdHJSZWdleCwgIiIpOwoJICAgIHN0cmluZyByZXN1MiA9IFJlZ2V4LlJlcGxhY2Uobm9tZTIsIHN0clJlZ2V4LCAiIik7CgkgICAgCgkgICAgQ29uc29sZS5Xcml0ZUxpbmUocmVzdTApOwoJICAgIENvbnNvbGUuV3JpdGVMaW5lKHJlc3UxKTsKCSAgICBDb25zb2xlLldyaXRlTGluZShyZXN1Mik7Cgl9Cn0=