Skip to content

object extract

Ryan Newington edited this page Jun 6, 2016 · 6 revisions

object-extract

The <object-extract> element contains a regular expression that is used to parse results from synchronous command that are marked as containing objects.

Standard NET regular expression syntax is used, with named capture groups used to extract the attributes. Unnamed capture groups are ignored, as are any capture groups with names that were not found in the schema, unless they are defined in a multivalue-extract.

Multi-valued attributes can be extracted with the object-extract element, and further parsed with the multivalue-extracts function.

Example - Full Import

<object-extract><![CDATA[^(?<accountName>.+)?:\*?:(?<gid>.+)?:(?<members>.+)?$]]></object-extract>

The example above extracts the accountName, gid, and member values from each line of the result output

Example - Delta Import

<object-extract><![CDATA[^(?<changeType>[[ard]]):(?<accountName>.+)?:\*?:(?<gid>.+)?:(?<members>.+)?$]]></object-extract>

The example above extracts the accountName, gid, and member values from each line of the result output, and extracts the changeType value as either a, r or d (add, replace and delete respectively), for use with a delta import. See modification-type-mappings for more information.