It's not JDOM, it's Java. Java requires you to escape a \ in a string as \\.

Bob Foster

David Morris wrote:

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]



Reply via email to