commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dion Gillard" <dion.gill...@gmail.com>
Subject Re: [jexl] How to escape the Apostrophe
Date Fri, 26 May 2006 15:09:20 GMT
Jexl doesn't have a way of escaping quotes as such.

All Strings in Jexl are either single quoted or double quoted, no mixing of
the two.

Is there no way you could replace the first and last single quotes with
doubles?

On 5/26/06, Nestor Urquiza <nestoru@yahoo.com> wrote:
>
> Hello guys,
> I need to have a string resulting from the expression
> "foo's brother" + " is bar"
>
> However the software I am using is expecting the
> concatenation to use single quotes like:
>
> 'foo's brother' + ' is bar'
>
> Of course the above is invalid and I cannot come up
> with a solution for escaping. I have tested:
>
> 'foo\'s brother' + ' is bar'
> and
> 'foo\\'s brother' + ' is bar'
>
> But they are invalid as well. Can I escape the
> apostrophe?
>
> What are the possible solutions for it?
> Thanks!
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>


-- 
http://www.multitask.com.au/people/dion/
Chuck Norris sleeps with a night light. Not because Chuck Norris is afraid
of the dark, but because the dark is afraid of Chuck Norris

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message