VBScript Split function usage
Usage: return array = Split (original string, string to find, split into several arrays)
Returns a zero-based one-dimensional array that contains the specified number of substrings.
Split (expression[, delimiter[, count[, compare]])
For example, a comma (,) splits a string into an array
The Split function syntax has the following parts:
Expression is required. A string expression that contains substrings and delimiters. If expression is a zero-length string (""), split returns an empty array, which is an array of elements and data.
Delimiter is optional. string character used to identify the bounds of the substring. If omitted, an empty characters ("") is used as the separator. If delimiter is a zero-length string, the returned array contains only one element, the complete expression string.
Count is optional. The number of substrings to return,-1 indicates that all substrings are returned.
Compare is optional. Numeric value that represents the comparison method to use when distinguishing substrings. See the "Set Values" section for their values.
Settings for parameters
Set value of compare parameter:
Constant numerical description
VbUseCompareOption-1 performs the comparison using the setting value in the Option Compare statement.
Vbbinarycompare 0 performs binary comparisons.
vbTextCompare 1 performs a text comparison.
Vbdatabasecompare 2 is for Microsoft Access only. Perform comparisons based on information from your database.
Output results: "12345", "12345", "12345"
The following returns only advanced, intermediate, low-level, advanced only as a string, that is, only the value of the split (astring) (0) is returned, and other values result in a subscript out of bounds error. So when you decompose with the following methods, you can only use a single space to split, but not other characters.
Split command use
Splits the file into segments.
To split a file into multiple files that contain a specified number of rows
Split [-L linecount] [-a suffixlength] [File [Prefix]]
To split a file into multiple files that contain a specified number of bytes
Split-b Number [k | m] [a suffixlength] [File [Prefix]]
The split command reads the specified file and is written on a group of output files in a 1000-line size. The first output file name consists of a combination of the specified prefix (the default value x) and the AA suffix, and the second file name is composed of a combination of prefix and ab suffixes, so that the dictionary follows Preface to ZZ (up to 676 files). The number of letters for the suffix and the number of output name files can be increased with the-a flag.
The Prefix you specify cannot be longer than path_max-2 bytes (if the-a flag is specified, it cannot be longer than path_max-suffixlength bytes). The Path_max variable specifies the length of the system's maximum pathname (defined in the/usr/include/sys/limits.h file).
If you do not specify an input file or if you specify-(minus) The file name, the split command reads the file from the standard input.
Note: the-B and-L flags are mutually exclusive.
-a suffixlength Specifies the number of letters used to form the suffix portion of the output name file. Number of letters determines the number of possible combinations of output file names. The default is two letters.
-B divides the file into bytes specified by the number variable. The K (kilobytes) or M (megabyte) multiplier is added to the end of the number value to separate the files into number*1024 bytes or several segments of number*1,048,576 bytes.
-L LineCount Specifies the number of rows per output file. The default value is 1000 rows.
This command returns the following exit values:
The 0 command runs successfully.
>0 an error occurred.