[Esapi-user] RegEx for validator needs double backslash escaped?

weiping guo weiping_guo at yahoo.com
Mon May 23 16:11:19 EDT 2011

Thanks a lot. Just checked Java ref, indeed double backslahese are needed. 
--- On Mon, 5/23/11, Kevin W. Wall <kevin.w.wall at gmail.com> wrote:

From: Kevin W. Wall <kevin.w.wall at gmail.com>
Subject: Re: [Esapi-user] RegEx for validator needs double backslash escaped?
To: "weiping guo" <weiping_guo at yahoo.com>
Cc: esapi-user at lists.owasp.org
Date: Monday, May 23, 2011, 3:55 PM

I think you need two. You want the regex to end up with '\.'  I think you need the 1st backslash to quote the 2nd b/c the regex pattern is read as a string.
Kevin W. Wall
Sent from DroidX; please excuse typos.
On May 23, 2011 2:04 PM, "weiping guo" <weiping_guo at yahoo.com> wrote:
> Hi,
> I noticed the RegEx used for Validator in SwingSet is double backslash escaped, like the following:
> Validator.Email=^[A-Za-z0-9._%-][email protected][A-Za-z0-9.-]+\\.[a-zA-Z]{2,4}$
> Is this required? Or single backslash would be OK?
> Thanks.
> Jim 
> _______________________________________________
> Esapi-user mailing list
> Esapi-user at lists.owasp.org
> https://lists.owasp.org/mailman/listinfo/esapi-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.owasp.org/pipermail/esapi-user/attachments/20110523/f0a7d59e/attachment.html 

More information about the Esapi-user mailing list