Fix repository id extraction
diff --git a/release.sh b/release.sh
index 3685f48..028088f 100755
--- a/release.sh
+++ b/release.sh
@@ -496,7 +496,7 @@
 fi
 
 # Determine the staging repository and close it after deploying the release to the staging area
-stagingrepoid=$(mvn org.sonatype.plugins:nexus-staging-maven-plugin:LATEST:rc-list -DnexusUrl=https://repository.apache.org -DserverId=apache.releases.https | grep -v "CLOSED" | grep -Eo "(orgapachewicket-\d+)";)
+stagingrepoid=$(mvn org.sonatype.plugins:nexus-staging-maven-plugin:LATEST:rc-list -DnexusUrl=https://repository.apache.org -DserverId=apache.releases.https | grep -v "CLOSED" | grep -Eo "orgapachewicket-[0-9]+" | sed 's/orgapachewicket-//';)
 
 echo "Closing staging repository with id $stagingrepoid"
 mvn org.sonatype.plugins:nexus-staging-maven-plugin:LATEST:rc-close -DstagingRepositoryId=$stagingrepoid -DnexusUrl=https://repository.apache.org -DserverId=apache.releases.https -Ddescription="Release has been built, awaiting vote"