Skip to content

Commit 5b43e3c

Browse files
Merge pull request #434 from JaerongA/master
Fix regexp
2 parents edd7eb0 + 4c90e14 commit 5b43e3c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

+dj/ERD.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,14 @@ function draw(self)
113113
% draw the diagram
114114

115115
% exclude auxiliary tables (job tables, etc.)
116-
j = cellfun(@isempty, regexp(self.nodes, '^`[a-z]\w*`\.`~\w+`$'));
116+
j = cellfun(@isempty, regexp(self.nodes, '^`[a-zA-z0-9_-]+`\.`~\w+`$'));
117117
self.nodes = self.nodes(j);
118118

119119
self.makeGraph
120120

121-
rege = cellfun(@(s) sprintf('^`[a-z]\\w*`\\.`%s[a-z]\\w*`$',s), ...
121+
rege = cellfun(@(s) sprintf('^`[a-zA-z0-9_-]+`\\.`%s[a-z]\\w*`$',s), ...
122122
dj.Schema.tierPrefixes, 'uni', false);
123-
rege{end+1} = '^`[a-z]\w*`\.`\W?\w+__\w+`$'; % for part tables
123+
rege{end+1} = '^`[a-zA-z0-9_-]+`\.`\W?\w+__\w+`$'; % for part tables
124124
rege{end+1} = '^\d+$'; % for numbered nodes
125125
tiers = cellfun(@(l) find(~cellfun(@isempty, regexp(l, rege)), 1, 'last'), ...
126126
self.graph.Nodes.Name);

0 commit comments

Comments
 (0)