I'm trying to format this text with regex but I do not have the desired return:
From:
"ST STN, SET J, * STORES T-40 / T41, - TER-REO, SHOPPING & BOULEVARD KM 28,5 VALUE 450.00 CENTRAL. "
To:
"ST STN CONJUNTO J LOJAS T40 T41 TERREO SHOPPING AND BOULEVARD KM 28,5 450.00 CENTRAL "
My code:
String padrao = @"(?i)(,|.)?[^A-Za-z0-9]\s"; String padrao =
@"(?i)[^0-9a-z]\s]";
Regex rg = new Regex(_texto, " ");
var arrayTexto =
resultado.Normalize(NormalizationForm.Formd).toCharArray();
foreach(char letter in arrayTexto) { if
(CharUnicodeInfo.GetUnicodeCategory(letter) !=
UnicodeCategory.NonSpacingMark) sb.Append(letter); }
What's wrong?