May 26, 2022 Replaces all multiple spaces / tabs (whitespaces) to single space in a string B4X: Sub greedyTrim (Text As String) As String If Text = "" Then Return Text Else Return Regex.Replace("\h+",text," ") End Sub Last edited: May 26, 2022 Click to expand...
Replaces all multiple spaces / tabs (whitespaces) to single space in a string B4X: Sub greedyTrim (Text As String) As String If Text = "" Then Return Text Else Return Regex.Replace("\h+",text," ") End Sub