recreate a basic sscanf.m using regular expressions in matlab
main.m
functiondata = my_sscanf(input_str, format)% Find all the tokens tokens = regexp(input_str, format, 'tokens');
% Initialize data data = cell(1, numel(tokens));
% Extract data from matched tokensfori = 1:numel(tokens)
data{i} = tokens{i}{1};
endend