diff --git a/RDFSharp/Model/RDFNamespace.cs b/RDFSharp/Model/RDFNamespace.cs index 60e915f4..3b47e6a6 100644 --- a/RDFSharp/Model/RDFNamespace.cs +++ b/RDFSharp/Model/RDFNamespace.cs @@ -57,7 +57,7 @@ public RDFNamespace(String prefix, String uri) { if (prefix != null && prefix.Trim() != String.Empty) { prefix = prefix.Trim(); - if (Regex.IsMatch(prefix, @"^[a-zA-Z0-9_]+$")) { + if (Regex.IsMatch(prefix, @"^[a-zA-Z0-9_\-]+$")) { if (prefix.ToUpperInvariant() == "BNODE" || prefix.ToUpperInvariant() == "XMLNS") { throw new RDFModelException("Cannot create RDFNamespace because \"prefix\" parameter cannot be \"bnode\" or \"xmlns\""); }