On 06/07/07, Christoph Gaffga <[EMAIL PROTECTED]> wrote:
hi,

thanks for your quick reply.

> Try
> e = ExpressionFactory.createExpression("foo.bar.indexOf('"\n'")");

now I got a syntax error, do you mean:
e = ExpressionFactory.createExpression("foo.bar.indexOf('\"\n'\")");

Sorry, yes, I was thinking of another language.

Try using a variable instead:

jc.getVars().put("nl","\n");
e = ExpressionFactory.createExpression("foo.bar.indexOf(nl)");


I tried some variations, still the same exception.

regards,
Christoph


sebb wrote:
>> I have some problems to use Jexl expressions to look for special
>> characters in strings, like newline or tabs:
>>
>>  e = ExpressionFactory.createExpression("foo.bar.indexOf('\n')");
>
> Does not look valid syntax.
>
> Try
>
> e = ExpressionFactory.createExpression("foo.bar.indexOf('"\n'")");
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to