MATLAB: Split a string with strsplit unique

string split

I have this string
a='Position=a.Velocity=b.Acceleration=c.'
strsplit(a,{'Velocity=','.'})
ans =
'Position=a' 'b' 'Acceleration=c' ''
but the result I want in ans is only b how I can do it?

Best Answer

Experiment with the regexp function.
Example:
a='Position=a.Velocity=b.Acceleration=c.';
Vel = regexp(a, '(?<=Velocity=)\w', 'match')
Vel =
cell
'b'