Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

MatchRegexCondition applies the Regex to the value in the provided fieldpath and allows to either validate the value (regex validation) or to generate an output. Extract the Product Code from the filename and use it in the following transformations to e.g. apply tags for product attributes. This is especially useful when you have a media standard in place and all files follow naming rule conventions e.g. every file is named with product-code_project-name_department_date. 

Triggers if the Regular Expression is true.

Specific Definitions

Select the condition.

PropertyValue
kind

MatchRegexCondition

fieldpath

layerId.fieldId

Details on accessing field values, specifically fieldpath starts lowercase

Supports JSON path syntax which you can test here: https://jsonpath.com.

regex

Provide the regular expression that should be applied to the value in the provided fieldpath. 

See Regular Expression for further info. 

storeIn

Define an optional variable where the regex output should be stored, to use in the following transformations and actions. 

Provide any name you like, avoid numbers at the beginning. 

You can leave this field empty. If you don't define it the output value will just be passed to the next transformation. 

Check Filename of Image, Get Product Code and Store in "parsed_filename" Variable
{
	"kind": "MatchRegexCondition",
	"fieldPath": "imageMetadata.fileName",
	"regex": "(?<productCode>^(F-|G-|V-)[^_]*?)_()",
	"storeIn": "parsed_filename"
}
  • No labels