MATLAB: How to delete the dot in a string

string

like bbc.ed.123.f.txt how to change it to bbced123f.txt

Best Answer

a = 'bbc.ed.123.f.txt';
regexprep(a,{'\.','txt'},{'','.txt'})
or
[strrep(a(1:end-4),'.',''),'.txt']