[rules-users] Problem with \" while compiling DRL
Fernando Meyer
fmcamargo at gmail.com
Tue Apr 24 13:45:06 EDT 2007
Good morning Cendric
you must use \\ instead \, because the
single backslah is used as escape character.
regards
On 4/24/07, Cédric D'Inca <animageo at gmail.com> wrote:
>
> Hi everyone,
>
> I am currently experimentating troubles compiling a DRL file with a \"
> character in it.
> I am using Drools libraries 3.0.4.
> I used a XLS decision table that, once compiled, gave me a DRL. The
> following lines are extracted from it.
>
> #From row number: 14
>
> rule "Exemple 1 2006 10 10_14"
>
> salience 65522
> when
> Ctx:MyObject()
> eval(Ctx.GetPrp("TEST").getValue().equals("GER"))
> then
> Ctx.SetPrp("TRUC").setValue("test char \" test");
> end
>
> #From row number: 15
>
> The problem is that when compiled, an error is generated
>
> Unknown:0-1 mismatched token: [@0,0,0='<no text>',<-1>,0:-1]; expecting
> type 'end'
>
> If I modify the decision table to put
>
> Ctx.SetPrp("TRUC").setValue("test char " test");
>
> The result is the same
>
> Unknown:0-1 mismatched token: [@0,0,0='<no text>',<-1>,0:-1]; expecting
> type 'end'
>
>
> So it means that \" is not understood, however, if I put \z, I get the
> following error:
>
> Rule compilation error Invalid escape sequence (valid ones are \b \t \n \f
> \r \" \' \\)
>
> Where it is written that \" should be understood.
> Any idea?
>
> Greetings,
>
> Cédric D'INCA
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
--
Fernando Meyer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070424/8e71c4cf/attachment.html
More information about the rules-users
mailing list