David,
The second expression "[0-9]{18}[\.\,][0-9]{3}" is still invalid since you
cannot escape a comma.
Try running without the comma escaped: "[0-9]{18}[\.,][0-9]{3}".
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 04:25 cc
PM
Subject
Re: Schema Pattern Question
Please respond to
xerces-j-user
Ankit,
What you describe is what I would expect but it seems that in practice
I have to double escape the pattern. I am running my validation via
JDOM, so it is possible that is inserting the double escaping
requirement. What I have is a pattern that looks like
"[0-9]{18}[\\.\\,][0-9]{3}", which seems to work fine. However
"[0-9]{18}[\.\,][0-9]{3}" does not. Since you believe that it should
work, I will see what happens if I remove JDOM from the picture.
Thanks,
David Morris
>>> [EMAIL PROTECTED] 8/9/2004 2:14:39 PM >>>
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
---------------------------------------------------------------------
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]