How to remove unwanted whitespaces from a String

Hi, Robot Masters!

I’ve an issue with this string below:

String: Luisa Renata dos Santos|Norival…
Marques da Silva e Eunice Marques da Silva|Milton de Almeida Vieira e Mareia…
…Batista Vieira

Assuming that those dots “.” are whitespaces. How could I remove them off of this string?
I’ve already tried .Trim but it didn’t work

If MyStr is your string, reassign it to System.Text.RegularExpressions.Regex.Replace(MyStr, "\s+", " "). This will replace all whitespace with only a single space.

2 Likes

Great!
Thank you

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.