Scan
StringArray = Scan ( String AS String , Pattern AS String )
Matches a string against a pattern, and returns an array of all strings associated with a
'*'
generic character.
-
String is the string to match.
-
Pattern is a pattern, as described in LIKE.
Examples
Dim sResult AS String
Dim sLine AS String
Dim sElt AS String
Exec ["df"] To sResult
For Each sLine In Split(sResult, "\n")
For Each sElt In Scan(sLine, "* * * * *")
Print sElt; "|";
Next
Print
Next
Filesystem|Size|Used|Avail|Use%|Mounted on|
/dev/hda6|8.0G|3.8G|4.3G|47%|/|
/dev/hda5|31M|3.3M|26M|12%|/boot|
/dev/hda8|33G|31G|1.2G|97%|/home|
/dev/hda1|8.1G|4.1G|4.0G|51%|/mnt/win_c|
/dev/hda9|29G|27G|1.1G|97%|/mnt/win_d|
none|379M|52K|379M|1%|/tmp|
See also