From b3ffc3357fc300e3c5dc5cb24212eb76b808e2f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20Kusalananda=20K=C3=A4h=C3=A4ri?=
 <ak4@sanger.ac.uk>
Date: Thu, 7 Aug 2008 11:42:45 +0000
Subject: [PATCH] Modified parsing of multi-species database names.

---
 modules/Bio/EnsEMBL/Registry.pm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/modules/Bio/EnsEMBL/Registry.pm b/modules/Bio/EnsEMBL/Registry.pm
index 2eeae8f71e..85f4fcbeba 100644
--- a/modules/Bio/EnsEMBL/Registry.pm
+++ b/modules/Bio/EnsEMBL/Registry.pm
@@ -1200,9 +1200,10 @@ sub load_registry_from_db {
   }
 
   for my $db (@dbnames) {
-    if ( $db =~ /^([a-z]+)_collection_core_(\w+)/ ) { # NEEDS TO BE FIRST
-      if ( $2 eq $software_version ) {
-        $temp{$1} = 'collection_core_' . $2;
+    if ( $db =~ /^(\w+)_collection_core_(\d+)_(\d+)_(\w+)/ )
+    {    # NEEDS TO BE FIRST
+      if ( $3 eq $software_version ) {
+        $temp{$1} = 'collection_core_' . $2 . '_' . $3 . '_' . $4;
       }
     } elsif ( $db =~ /^([a-z]+_[a-z]+_[a-z]+)_(\d+)_(\d+[a-z]*)/ ) {
       if ( $2 eq $software_version ) {
@@ -1262,7 +1263,7 @@ sub load_registry_from_db {
   }
 
   # Register multi-species databases
-  my @multi_dbs = grep { /^[a-z]+_collection_core_\w+$/ } @dbnames;
+  my @multi_dbs = grep { /^\w+_collection_core_\w+$/ } @dbnames;
 
   foreach my $multidb (@multi_dbs) {
     my $sth =
-- 
GitLab