Fixed filtering out of non exact matches.

Patch proposed by Anatole, see:

https://gitlab.com/McModelTeam/McModelProject/issues/76
time-shift
Stéphane Adjemian(Charybdis) 2018-07-04 08:57:07 +02:00
parent 37bd4a1fea
commit 33d752bad3
1 changed files with 1 additions and 1 deletions

View File

@ -134,7 +134,7 @@ for i = 1:length(vnames)
% Match all words with vnames{i}
[b, e] = regexp(rhs, sprintf('\\w*%s\\w*', 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)
b = b(rid);
e = e(rid);