Here is a simple example of the usage of the Extract$ keyword.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
' Usage of the EXTRACT$ Keyword example'
' Written by Michael Clease
 
 
Dim sMainString    As String Value "The quick brown fox jumped over the lazy dogs"
Dim sMatchString   As String Value "over"
Dim sExtractString As String
DIM Start as DWORD VALUE 4
DIM sMsg as string
 
 
sExtractString = Extract$(Start,sMainString,  sMatchString)
 
 
sMsg  = "sMainString    = " & sMainString    & $CRLF
sMsg += "sMatchString   = " & sMatchString   & $CRLF
sMsg += "sExtractString = " & sExtractString & $CRLF & $CRLF
 
 
MsgBox 0, sMsg