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.

Reply via email to