Sub ExtractChars($s As String, $validChars As String) As String


Extracts the specified characters ($validChars) from $s.


Parameters


  • $s ... String expression from which the specified characters are extracted.
  • $validChars ... String expression that defines the valid characters to extract.


Example:

Dim $s, $s2

$s = "This is number 22.3"
$s2 = ExtractChars($s, "0123456789,.")
' returns $s2 = "22.3"