MATLAB 正規表現の簡単な例

>> [tok mat] = regexp('abc-def-ghi', '.-(.*)-.', 'tokens', 'match');
>> tok{1}

ans =

    'def'

>> mat{1}

ans =

c-def-g

>>