In the Definition field for your user-defined property, you can use regular expressions to filter results using regexp_extract
and regexp functions.
regexp_extract
regexp_extract Syntax
|
regexp_extract(formatted_result, identifier1, pattern1, identifier2, pattern2, ...)
|
This searches a string with a list of regular expressions to produce a formatted string result compiled from back references.
Back references are the results of capturing groups from the regular expressions and referencing them in order by $N, where
N is a number that is greater than or equal to 1. This N identifies the captured string returned by a back reference in the
order it appears in the matching pattern. At a minimum, only three arguments are needed for regexp_extract. You can use any
number of pairs of attributes and expressions.
Example: In this example, both captured groups ($1 and $2) come from the regular expression for Description. The expression
for Node does not have any capturing groups. It is used only as an additional filter. If any of the regular expressions fail
to match, the overall regexp_extract fails to match.
"regexp_extract("$1 ($2)", Description, ";interconnect to ([^\(]*) \(([^\)]*)\)", Name, "^(?!.*lo)")
regexp
boolean regexp Syntax
|
regexp(identifier1, pattern1)
|
This regexp syntax returns true, false, or null.
Example: If Node starts with 'palt', then sum the Traffic In and Traffic Out values. If the Node starts with something else,
or is null, no value is displayed.
case when regexp(node, '.*PALT.*') then traffin + traffout else null end
Example: If your node names include site names, this regexp syntax is useful for creating site properties for interfaces.
regexp_extract('$1', node, '([^-]+)-(.*)')