yes, then the app gets:

^[0-9]\''{\''0,10\''}\''(,[0-9]\''{\''0,2\''}\'')?$

all the escaping does is replace ' with '', which makes it a little hard
to stop
it as the comparison is done on a character by character basis...
 

> -----Original Message-----
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Siggelkow
> Sent: 24 November 2004 17:59
> To: [EMAIL PROTECTED]
> Subject: Re: Getting a regular expression from application.properties
> 
> 
> 
> Did you try escaping the single qoutes with a backslash?
> 
> ^[0-9]\'{\'0,10\'}\'(,[0-9]\'{\'0,2\'}\')?$
> 
> 
> Simon Matic Langford wrote:
> 
> > I have a regular expression for date formatting (don't ask!) in our
> > application.properties. This can
> > change depending on user locale. I am trying to get the 
> following value
> > back:
> > 
> > ^[0-9]'{'0,10'}'(,[0-9]'{'0,2'}')?$
> > 
> > However in MessageResources at line 346: format = new
> > MessageFormat(escape(formatString));
> > 
> > escape replaces ' with '', which means that my {'s and }'s don't get
> > escaped properly
> > and MessageFormat throws an IllegalArgumentException saying it can't
> > parse the expression.
> > 
> > Is there any way to persuade Struts not to do this escaping without
> > totally bypassing
> > it?
> > 
> > I am using Struts 1.1 and cannot upgrade...
> > 
> > Thanks
> > 
> > Simon
> > 
> > 
> > 
> > The information contained in this e-mail is intended only 
> for the person
> > or
> > entity to which it is addressed and may contain confidential and/or
> > privileged material. If You are not the intended recipient of this
> > e-mail,
> > the use of this information or any disclosure, copying or 
> distribution
> > is
> > Prohibited and may be unlawful. If you received this in 
> error, please
> > contact the sender and delete the material from any 
> computer. The views
> > expressed in this e-mail may not necessarily be the views 
> of The PCMS
> > Group
> > plc and should not be taken as authority to carry out any 
> instruction
> > contained.
> >  
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> 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