Skip to main content

Data Extraction - listfind

V1 - listfind

  • listfind("[patternName]:(? (newVariableName) .*)",variableName) The command listfind is to extract pattern from a list of strings.

Example:

load resource office365Device
let {physicalIds, deviceVersion} = f("@office365Device")
let {}=listfind("\[USER-GID]:(?<userid>.*)",physicalIds)

In the example above, the variable "physicalIds" contains four patterns ("USER-GID", "GID", "USER-HWID" and "HWID") and the first one is extracted as a variable "userid" by using the command listfind.