I read an .xlsx file where some cells contain special characters. This has caused me problems when it comes to inserting such data into a database, so I am trying to replace such characters with blanks, as shown below:
using System;
using System.Text.RegularExpressions;
namespace ConsoleApp2
{
public class Program
{
public static void Main(string[] args)
{
var name = "MONEDA S.A. ADMINISTRADORA DE FONDOS DE INVERSIモN";
name = Regex.Replace(name, @"[^A-Za-z0-9 ]", "");
Console.WriteLine(name);
}
}
}
but in that way, I also substitute characters like .
, -
and ,
- which is undesirable. So, how can I replace only non-Roman characters?