In order to match dot(.) or comma (,) the expression [\.,] is enough. There
is no reason to escape the comma itself or to put comma as an indicator of
OR
in the regex. The valid escapes are given in [1].

[1] http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#nt-SingleCharEsc

Thanks

Ankit Pasricha
XML Parser Development
IBM Toronto Lab
8200 Warden Avenue, Ontario L6G 1C7
Phone: (905) 413 4941


                                                                           
             "David Morris"                                                
             <[EMAIL PROTECTED]                                             
             mcreek.com>                                                To 
                                       <[EMAIL PROTECTED]>      
             08/09/2004 03:28                                           cc 
             PM                                                            
                                                                   Subject 
                                       Schema Pattern Question             
             Please respond to                                             
               xerces-j-user                                               
                                                                           
                                                                           
                                                                           
                                                                           




I have found when entering a regular expression pattern that I have to
escape back slashes when using Xerces-j. For example <xsd:pattern
value="[\\.,\\,]"/> to match dot (.) or comma (,). I would have thought
that "[\.,\,]" would work. I can understand why I would have to do this
in a java.lang.String but it seems like the implementation should not
show through here. Am I doing something wrong? The error says "this
expression is not supported in the current option setting" -- should I
change some option setting?

Thanks,

David Morris

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to