Re: regexp validatation problem

2011-11-19 Thread Thiago H. de Paula Figueiredo
On Fri, 18 Nov 2011 21:08:12 -0200, Barry Books wrote: I'm having a problem with regexp validation. If I put zip-regexp=^\\d{5}(-\\d{4})?$ Have you tried ^\d{5}(-\d{4})?$ ? The double backslashes are need in Java code to escape the '\' character, but isn't needed outside code. -- Thiago H

regexp validatation problem

2011-11-18 Thread Barry Books
I'm having a problem with regexp validation. If I put zip-regexp=^\\d{5}(-\\d{4})?$ in a property file I get this on my Javascript console SyntaxError: JSON Parse error: Invalid escape character d and regexp does not work on the client. If I put zip-regexp=^d{5}(-d{4})?$ the client wo