XML regular expressions flavor to Java regular expressions



Is there a tool or library that translates from the regular expression flavor used in XSD (e.g. as described here) to the flavor used by Java's Pattern class? Or, failing that, a Java regular expression library that can directly handle the XML regular expressions flavor? Or failing that, what is the equivalent Java regular expression for the following XML regular expression?



<xs:pattern value="[\w\d][\w\d\-_\.!~\*'\(\)\+=]{2,}"/>

No comments:

Post a Comment