57d1068b88c6255f3530cb981bf97bb127a459f9
angie
  Wed Sep 26 11:42:17 2018 -0700
Fixing typo in regex for ignoring stuff after the colon and position range in altLocations names.  refs #18854

diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c
index 9e260a4..0e4ed87 100644
--- src/hg/hgTracks/hgTracks.c
+++ src/hg/hgTracks/hgTracks.c
@@ -3310,31 +3310,31 @@
 struct virtRegion *after = virtRegionList;
 virtRegionList = NULL;
 struct sqlResult *sr;
 char **row;
 char *table = endsWith(haplotypeId, "_fix") ? "fixLocations" : "altLocations";
 if (! hTableExists(database, table))
     {
     warn("initSingleAltHaplotype: table '%s' not found in database %s, "
          "can't find %s", table, database, haplotypeId);
     return FALSE;
     }
 
 // where is the alt haplo placed?
 char query[256];
 sqlSafef(query, sizeof(query), "select chrom, chromStart, chromEnd from %s "
-         "where name rlike '^%s(:[0-9-]+?)'", table, haplotypeId);
+         "where name rlike '^%s(:[0-9-]+)?'", table, haplotypeId);
 sr = sqlGetResult(conn, query);
 row = sqlNextRow(sr);
 if (!row)
     {
     warn("no haplotype found for [%s] in %s", haplotypeId, table);
     return FALSE;
     }
 char *haploChrom = cloneString(row[0]);
 int haploStart = sqlUnsigned(row[1]);
 int haploEnd   = sqlUnsigned(row[2]);
 sqlFreeResult(&sr);
 // what is the size of the alt haplo?
 int haploSize = hChromSize(database, haplotypeId); // hopefully this will work
 
 // insert into list replacing original haploChrom record