I’m not aware of any parser on the planet that would be able to directly do what you describe. How would a parser know that “c,d” is to be treated differently from the others?
If you’re trying to perform flat-file processing of a single record, the the flat-file services will do what you want BUT the data would need to look like this:
a,b,“c,d”,e,f
The quotes tell the parser to not treat delimiters as delimiters. You can refer to these for additional information about delimited data parsing and how to support delimiters in the data.
The flat file services documentation describes how to properly escape delimiters and supports doing so both for creating and parsing delimited data.
Keep in mind most people/vendors tend to forget there are 2 delimiters in a file – the field delimiter (comma, tab, etc.) and the record delimiter (carriage return or line feed or both or something else). The techniques describe how to support any of these in the data without resorting to search and replace (which is error prone) or other manipulation.
On another note, be aware of the specific behaviors of tokenize which uses java.util.StringTokenizer.The tokenize service has behaviors that more often than not are not expected nor desired. E.g. it collapses consecutive delimiters into one. For this reason, we created a service that uses java.String.split instead.
#webMethods#webMethods-io-B2B#B2B-Integration