Function: Extract

Description

Extracts a substring between a starting string and an optional ending string. The string to delimit the start of the desired substring must be specified. The string to delimit the end of the substring is optional. If the second argument is not found the function extracts everything from the starting string to the end of the field. The case of the delimiting string is ignored.

Syntax

Extract(string,start string[,end string])

Arguments

string is the string containing the substring. The string can be a constant, a character field, an expression that results in a string or a function that returns a string.

start string is the string delimiting the start of the desired substring.

end string is the optional string delimiting the end of the desired substring.

Return value

This function returns a character string.

Calculated field example

If the Letters field contained the value of abc[def]ghi, the following calculated field expression would return def: Extract(Letters,"[","]")

Filter/Find example

Records with a Letters field value of def can be selected or found using the expression: Extract(Letters,"[","]")="def"

 

 

© 2024 Altair Engineering Inc. All Rights Reserved.

Intellectual Property Rights Notice | Technical Support