The Extract () function takes a value from the specified string that is determined by the regular expression to be specified as a parameter 1). \
Extract(string, regular expression)
Note: In the RegEx,a so-called Capturing Group has to be determined. A capturing group is enclosed with the round brackets.
In this example, the capturing group is defined with ([a-zA-Z]).:
Extract(Items[1]/@SupplierSeason, '[a-zA-Z]([a-zA-Z])\d{2}')
If a@SuppliereSeason =' 9 AW17', the function returns' W' accordingly.
Note: Recommended tools for developing and testing regular expressions are regex101.com and regexper.com.
Extract('value: 123 value2: 789', '(\d+)')
returns 123
Extract('value: 123 value2: 789', 'value2: (\d+)')
returns 789
Extract('value: 123 value2: 789', '^value2: (\d+)')
returns empty
Extract('value: 789', '^value: (\d+)')
returns 789
Extract('value: 123 value: 789', '^value:[ ]*(\d+)')
returns 123