eBiss 3

Hilfe & Dokumentation

User Tools

Site Tools


en:transformation:mappings:funktionen:string:extract

Table of Contents

Extract

The Extract () function takes a value from the specified string that is determined by the regular expression to be specified as a parameter 1). \

Syntax:

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.

Samples:

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

1)
RegEx = regular expression
en/transformation/mappings/funktionen/string/extract.txt · Last modified: 2024/02/20 08:15 by 127.0.0.1