You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Jean Croteau <cr...@cognicase.ca> on 2002/05/09 21:03:35 UTC

Reg expression

I'm trying to validate a date with the format yyyymmdd using an xml schema.  So I'm using a regular expression that goes as follow :

^((0?[1-9]|[12][1-9]|3[01])\.(0?[13578]|1[02])\.20[0-9]{2}|(0?[1-9]|[12][1-9]|30)\.(0?[13456789]|1[012])\.20[0-9]{2}|(0?[1-9]|1[1-9]|2[0-8])\.(0?[123456789]|1[012])\.20[0-9]{2}|(0?[1-9]|[12][1-9])\.(0?[123456789]|1[012])\.20(00|04|08|12))$

Ok, so maybe it sucks, but I don't know of any other way to do it.  Anyway, I get an error when I parse it using xalan.  It says that 02.02.2002 is not valid.  But it is valid, I tried this regular expression in a bunch of tools and it worked everywhere.  Is this a xalan issue or is it a xml schema limitation ?  Do xml schemas and/or xalan support POSIX regular expression syntax ?