Language: Improve RemoveInvalidCharacters to remove double spaces and dots

This commit is contained in:
Jonathan Jenne 2021-07-29 16:36:12 +02:00
parent 2cf837cc92
commit 47065c19a3

View File

@ -136,6 +136,10 @@ Public Class Utils
' Remove Invalid filename characters ' Remove Invalid filename characters
oResult = Regex.Replace(oResult, InvalidChars.Paths, String.Empty) oResult = Regex.Replace(oResult, InvalidChars.Paths, String.Empty)
' Remove Uneccessary characters
oResult = Regex.Replace(oResult, "\s{2,}", " ")
oResult = Regex.Replace(oResult, "\.{2,}", ".")
' Remove excess space chars ' Remove excess space chars
oResult = oResult.Trim() oResult = oResult.Trim()