The SplitToArray function splits a string according to a list of separators and returns a structure that allows iteration in the RuleSet.
SplitToArray ('string','separator/string', boolean, boolean,)
Parameters:
Following returns five structure entries with index 0 - 4 and the values.
SplitToArray("Paul;Mustermann;street 22;99999,city", ";,")
The next one results in value: „street 22“
SplitToArray("Paul;Mustermann;Street 22;99999,City", ";,")/Items[@Index = 2]/@Value
Without specification of the third parameter, empty values are removed, so the next statement returns the value: „99999“.
SplitToArray("Paul;; Street 22,,;99999,City", ";,")/Items[@Index = 2]/@Value
The following delivers: 4
count(SplitToArray("Paul;; Street 22,,;99999,City", ";,")/Items)
Without removing blank values and without trim, by setting parameters three and four to false, the next example returns the value: „ Street 22“.
SplitToArray("Paul;; Street 22,,;99999,City", ";,", false, false)/Items[@Index = 2]/@Value
Use a string as a separator: @Rg_Betreff = „Test Erechnung
Zeile 2“
SplitToArray( @Rg_Subject, '
', true(), true() )