I am implementing a function (in Python) that checks for conformance of the string to xsd:anyURI
.
According to Schema Central it only makes sense to check for repeated, consecutive and non-consecutive #
characters and %
followed by something other than hex characters 0-Ff.
So far, I have something like and it seems to be working:
if uri.search('(%[^0-9A-Fa-f]+)|(#.*#+)')
The second expression for multiple '#' signs may be faulty.