Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSF 2 <f:validateRegex problem

843844May 13 2010 — edited May 17 2010
Hi all,

I'va noticed that <f:validateRegex pattern uses only one backslash to escape regular expressions special characters, even though Sun's doc
http://java.sun.com/javaee/javaserverfaces/2.0/docs/pdldocs/facelets/f/validateRegex.html
states that a backslash must be escaped like any other java strings

"A regular expression pattern. Remember that, like in all Java strings, backslash must be escaped with another backslash."

When i tried pattern="\.+" this worked fine

but pattern="\\.+" would not!

Am i wrong? Have i missed something here ?

Thanx for help
Kaesar
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 14 2010
Added on May 13 2010
4 comments
695 views