Good suggestion, perhaps I should add an advanced string library to QBJS.
In the meantime, you could use this little function to do a regular expression search:
In the meantime, you could use this little function to do a regular expression search:
Code: (Select All)
Dim s As String
s = "The quick brown fox jumps over the lazy dog. If the dog barked, was it really lazy?"
' Find any character that is not a word character or whitespace
Dim idx As Integer
idx = Search(s, "[^\w\s]")
' Expected output: 43
Print idx
Function Search (searchStr As String, regex As String)
$If Javascript Then
Search = searchStr.search(regex);
$End If
End Function