I don't use simulink and I am not familiar with the formatting of your version control system's keyword... In regular MATLAB with unexpanded keywords looking like $unexpanded keyword$" and expanded keywords looking like $expanded keyword: value$, you could define a function like:
function [keyword, value] = rckeyword(str) if ~isempty(strfind(str, ': ')) keyword = str(2:(strfind(str, ': ')-1)); value = str((strfind(str, ': ')+2):(end-1)); else keyword = str(2:(end-1)); value = ''; end end
Then in your version controlled m files include:
[keyword1, value1] = rckeyword('$Expanded Keyword: hello world$') [keyword2, value2] = rckeyword('$Unexpanded Keyword$')