This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Specifying the characters that cannot be present using PATTERN Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Specifying the characters that cannot be present using PATTERN" Watch "Specifying the characters that cannot be present using PATTERN" New topic
Author

Specifying the characters that cannot be present using PATTERN

Abhi Venu
Ranch Hand

Joined: Jul 09, 2009
Posts: 73
i can use pattern to specify some of the allowable characters for a field . How can i use the same pattern to specify the characters that are not allowed in a field.can any give a small example. <xs:pattern value="([^a-zA-Z0-9-()\\ /.<_])*"/> will this restrict the usage of these characters in a field


A table, a chair, a bowl of fruit and a violin; what else does a man need to be happy?:Einstein
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9916
    
158

Abhi Venu wrote:<xs:pattern value="([^a-zA-Z0-9-()\\ /.<_])*"/> will this restrict the usage of these characters in a field


Did you try it?

[My Blog] [JavaRanch Journal]
Abhi Venu
Ranch Hand

Joined: Jul 09, 2009
Posts: 73
No I haven't I will try it now.Thank You
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Specifying the characters that cannot be present using PATTERN
 
Similar Threads
regex pattern to exclude certain substrings from matches
handle special characters from text area using
Strange behavior of the JFormattedTextField
javascript/html
RegEx to verify variable contents/length