Fixed filtering out of non exact matches.
Patch proposed by Anatole, see: https://gitlab.com/McModelTeam/McModelProject/issues/76time-shift
parent
37bd4a1fea
commit
33d752bad3
|
@ -134,7 +134,7 @@ for i = 1:length(vnames)
|
||||||
% Match all words with vnames{i}
|
% Match all words with vnames{i}
|
||||||
[b, e] = regexp(rhs, sprintf('\\w*%s\\w*', vnames{i}));
|
[b, e] = regexp(rhs, sprintf('\\w*%s\\w*', vnames{i}));
|
||||||
% Filter out non exact matches (words longer than vnames{i})
|
% Filter out non exact matches (words longer than vnames{i})
|
||||||
rid = find(~(e-b>length(vnames{i})));
|
rid = find(~(e-b>=length(vnames{i})));
|
||||||
if ~isempty(rid)
|
if ~isempty(rid)
|
||||||
b = b(rid);
|
b = b(rid);
|
||||||
e = e(rid);
|
e = e(rid);
|
||||||
|
|
Loading…
Reference in New Issue