Special letters

Hello :slight_smile:

I have strings that may or may not contain special letter like æøå og äóë and so on. Is it possible to replace these characters with normal a-z letters?

Any help appreciated :slight_smile:

Regards

Yeah,

You can use .Replace()

If you need to replace each individual character with its own individual character, then you will need to do a replace for each character.

"æøå og äóë".Replace("æ","AE").Replace("ø","0") // and so on

If you want to replace various characters with the same character, then you can use Regex.

System.Text.RegularExpressions.Regex.Replace("æøå og äóë", "æ|ø|å|ä|ó|ë", "")

There are probably various approaches to this.

Regards.

3 Likes

Thankyou ClaytonM :slight_smile: I figured it out.