Hi I wonder if its because you use regexp and then include tokens is not supported. I guess it may require special added logic to support this. Maybe something with a group in the regexp to have it return the ENT part as well.
On Wed, Jul 8, 2015 at 2:55 PM, Vincent Monnin <vincent.mon...@zeiss.com> wrote: > Hi, > I need to split a file that contains multiple message with multiple lines > like this: > ENT abcd > G00 efgh > G01 ijkl > G02 mnop > ENT 1234 > G00 5678 > G01 1245 > G02 1234 > > In this cas I need to retreive two files like that: > File 1: > ENT abcd' > G00 efgh' > G01 ijkl' > G02 mnop' > > File 2: > ENT 1234' > G00 5678' > G01 1245' > G02 1234' > > > I'm using DSL and wrote this context: > > <camelContext trace="false" id="EDI_process" > xmlns="http://camel.apache.org/schema/spring"> > <route id="EDI_splitter"> > <from uri="file://C:/test/in"/> > <split> > <tokenize token="ENT[^']*'" regex="true" xml="false" > includeTokens="true"></tokenize> > <bean method="setUUIDasFileName" beanType="com.zeiss.CZVuuid"/> > <to uri="file://C:/test/out"/> > </split> > </route> > </camelContext> > > I cannot find a way to keep the token "ENT..." in out files .... my result > is : > G00 5678' > G01 1245' > G02 1234' > Note that I can have G01 or G02 multiple times. > > I checked in forums and don't have a clue .... > Can you help me ? > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Camel-Split-How-to-keep-token-when-splitting-a-multilines-files-tp5768991.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/