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

Kevin W. Wall kevin.w.wall at gmail.com
Mon May 23 15:55:12 EDT 2011


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
--
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/5b67a18b/attachment.html 


More information about the Esapi-user mailing list