Subject: | Regexp for CURIEs seems too narrow |
Bio::Phylo::NeXML::Meta throws an error if CURIEs don't match
m/^([a-zA-Z_]+):([a-zA-Z0-9_\-\.]+)$/
In fact, the RDFa spec allows a much wider set of characters in CURIEs.
I'd recommend something like:
use XML::RegExp;
m/^($XML::RegExp::NCName)?:(\S*)$/
Yes - a single colon is actually a valid CURIE. (Per the XHTML+RDFa 1.0
spec, it expands to the URI <http://www.w3.org/1999/xhtml/vocab#>.)