If you set Data Element Separation to the method Use Data Pattern, messages in which fields are delimited by one of a set of characters or strings can be parsed.
For example, consider a simple message with two numeric fields that can have either of the characters ';' or '/' delimiting them. There are two approaches that you could use:
Composition = Sequence Data Element Separation = Use Data Pattern FieldA Data Pattern = [0-9]* Delim Data Pattern = [;/] optionally with a default value. FieldB Data Pattern = [0-9]*
After parsing, the elements FieldA and FieldB each contain any number of the digits 0 to 9, and the element Delim contains either ";" or "/".
Composition = Choice Data Element Separation = Use Data Pattern SubType1 Data Pattern = [0-9]*;[0-9]* (Composition = Sequence Data Element Separation = All Elements Delimited Delimiter = ';') FieldA FieldB SubType2 Data Pattern = [0-9]*/[0-9]* (Composition = Sequence Data Element Separation = All Elements Delimited Delimiter = '/') FieldA FieldB
The regular expressions differentiate between the two options that can occur in the message, which are then parsed as a normal delimited structure. After parsing, the elements FieldA and FieldB each contain any number of the digits 0 to 9. The delimiter found in the input message is not saved in an element.
You could refine this approach by using different names for the children, or elements for SubType1 and SubType2, to provide the knowledge of which delimiter is used, or to control which delimiter is included in the output message.