Nested parse expressions


Parse expressions can be nested and are evaluated in parenthetical order. There is no practical limit to nesting parse expressions. In the previous specifications, any parse-spec value can be substituted with another nested parse-spec value given.

Target string

Parse expression

Return value

Test1|README.txt

 

$basename(

$delim(pipe, 2))

readme

Note

The basename of the second field delimited by pipes is returned.

user account: AA|BB|CC – user account: DD|EE|FF

 

 

$skip (

user account, 2, $delim(pipe, 2))

ee

Note

The second pipe delimited word following the second match for user account is returned.

user account: AA|BB|CC – user account: DD|EE|FF

 

$delim (pipe, $skip (user account, 2, 2)

ee 

Note

An alternate way of parsing the preceding value from the string.

test addr: x@y.z

 

$match(test, $email(addr: *))

 

x@y.z

Note

Parse email only if the keyword test appears in the string.

test addr: x@y.z

$exclude(test, $email(addr: *))

No match. The message contains the word test. 

Related topic

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*