Hello
I started to study camel from simple example - it's copy a file. I found a
filter clause with 'regex' with the file name.
can anybody tell me about filter/choice/... with 'regex' (or like) on a BODY
file.
file's body is not xml-text, but only simple text.
src :
///////////////////////
CamelContext context = new DefaultCamelContext();
FileComponent fc1 = new FileComponent(context);
final Endpoint inFile =
fc1.createEndpoint("file:testdir/in?noop=true");
FileComponent fc2 = new FileComponent(context);
final Endpoint outFile = fc2.createEndpoint("file:testdir/out");
RouteBuilder builder = new RouteBuilder() {
public void configure() {
from(inFile).filter(body().regex("^(test)[\\s|\\S]*")).to(outFile);
}
}
context.addRoutes(builder);
context.start();
//////////////////
thanks,
Evgeny
--
View this message in context:
http://www.nabble.com/File-to-File-filter-tp14804967s22882p14804967.html
Sent from the Camel - Users mailing list archive at Nabble.com.