Extract
The Extract function extracts a word from a string.
Syntax
The Extract function
has the following syntax:
String = Extract(Expression, Index, [Delimiter])Parameters
The Extract function
has the following parameters.
Parameter |
Format |
Description |
|---|---|---|
|
String |
String expression from which to extract strings. |
|
Integer |
Word position of the substring, where |
|
array |
Array of characters that separate words in the string. Default is an array with the space character as the single element. |
Return value
The extracted substring.
Example
The following example shows how to extract a word from a string.
MyString = "This is a test.";
MyWord = Extract(MyString, 1, " ");
Log(MyWord);
MyString = "This|is|a|test.";
MyWord = Extract(MyString, 3, "|");
Log(MyWord);This example prints the following message to the policy log:
Parser Log: is
Parser Log: test.