Skip to content

Commit 9849f52

Browse files
committed
Fix get_master regex: allow #/~ prefix in master, keep \w+ for part
1 parent 6a8301b commit 9849f52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

datajoint/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def get_master(full_table_name: str) -> str:
5050
:return: Supposed master full table name or empty string if not a part table name.
5151
:rtype: str
5252
"""
53-
match = re.match(r"(?P<master>`[^`]+`.`[^`]+)__(?P<part>[^`]+)`", full_table_name)
53+
match = re.match(r"(?P<master>`[^`]+`.`[#~]?\w+)__(?P<part>\w+)`", full_table_name)
5454
return match["master"] + "`" if match else ""
5555

5656

0 commit comments

Comments
 (0)