...
Extract regex groups: If there is one or more groups in the regular expression and this option is enabled, then the value of the groups will be set in the destination metadata. If it is not checked, the complete match is stored in the destination metadata. The groups of a regular expression are defined between (
and )
. For example, this regular expression has one group: word1 (.*?) word2
. In this regular expression, we are searching for the part of a text starting with word1
and ending with word2
. Let's take this text: My word1 titi tata toto word2 and other words
. With the regular expression mentioned above, if the checkbox is enabled, then the destination metadata gets the value "titi tata toto"
. If the checkbox is not enabled, the destination metadata gets the value "word1 titi tata toto word2"
. Now, if we change a little the regex to have several groups, for example: word1 (.?) tata (.?) word2
. , the result is: destination metadata = "titi toto"
. “titi” and “toto” are extracted and set in destination metadata, separated by a spacewhitespace. This field is optional.
With several groups, the values will be added separated with space.
...