Split

Parse a string of delimited values into an array.

Syntax 
      Split(expression [,Delimiter [,count [,compare]]] )

Key
   expression  The string expression to be broken up into an array.

   Delimiter   The character used to separate items (default=a space " ")

   count       The number of strings

   compare    vbBinaryCompare (0) or vbTextCompare(1)

Example

vaPrices = Split("23.50, 67.50, 45.99, 18.47", ",")
WScript.Echo vaPrices(0)
> 23.50

“A gentle stream can split a mountain, given enough time”

Related:

Array - Add values to an Array variable
Join - Combine the contents of an array into a single variable.
Equivalent Powershell command: .Split method


© Copyright SS64.com 1999-2013
Some rights reserved