diff --git a/lib/SimpleSAML/Metadata/SAMLBuilder.php b/lib/SimpleSAML/Metadata/SAMLBuilder.php
index 8092f85782a1b97c76fa6c65cb7cd559a74c8839..ffcd18ef55ca79c12408bfa473edfb8c4f9c107c 100644
--- a/lib/SimpleSAML/Metadata/SAMLBuilder.php
+++ b/lib/SimpleSAML/Metadata/SAMLBuilder.php
@@ -122,7 +122,7 @@ class SimpleSAML_Metadata_SAMLBuilder {
 			$includeExtensions = TRUE;
 			foreach ($metadata['scope'] AS $scopetext) {
 				$scope = $this->createElement('shibmd:Scope', 'urn:mace:shibboleth:metadata:1.0');
-				$scope->setAttribute('regex', 'false');
+				$scope->setAttribute('regexp', 'false');
 				$scope->appendChild($this->document->createTextNode($scopetext));
 				$extensions->appendChild($scope);
 			}