camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: camel 2.0-M2 regex bug
Date Wed, 01 Jul 2009 18:34:10 GMT
On Wed, Jul 1, 2009 at 8:30 PM, Rodrigo Valerio<rsvalerio@gmail.com> wrote:
>
> The regex in the code above is never true in 2.0-M2
> from("direct:a").setBody(constant("000000000001111111"))
> .choice()
> .when( body(String.class).regex("^.*") ).process( new MyProcessor() )
> .otherwise().end
>
Hmm let me create an unit test based on this to see whats the issue.
Thanks for reporting.

> In 2.0-M1 is ok.
> In java Pattern/Matcher it runs ok too.
> This regex is to verify if the line starts with "0".
>
> Anyone know a workaround for this?
> I need a body(String.class).startsWith("0") or similar... In file processor
> this is very usefull...
Yeah good idea lets add those predicates to the builder as well.
startsWith/endsWith/constains (I think its already there)



> --
> View this message in context: http://www.nabble.com/camel-2.0-M2-regex-bug-tp24294888p24294888.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message