Skip to content
Snippets Groups Projects
Commit 4ca9bbe4 authored by Matthew Dawson's avatar Matthew Dawson
Browse files

Handle the case when more then one value comes out of the regex.

If more then one value comes out of the regex, handle that case.


git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/trunk/TableTool@8518 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
parent f75062bf
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,7 @@ for i=1:size(new_inputs,2)
new_inputs{i}(1) = regexprep(new_inputs{i}(1),'\s','');
valid = regexp(new_inputs{i}(1),'[a-zA-Z][_a-zA-Z0-9]*','match');
if isempty(char(new_inputs{i}(1))) || length(valid{1}) == 0 || ~strcmp(new_inputs{i}(1),valid{1})
if isempty(char(new_inputs{i}(1))) || length(valid{1}(1)) == 0 || ~strcmp(new_inputs{i}(1),valid{1}(1))
new_inputs{i}(2) = {'error'};
%revised_input = cat(2,revised_input,[char(inputs{i}(1)); 'error'])
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment