how to delete the dot in a string
Ältere Kommentare anzeigen
like bbc.ed.123.f.txt how to change it to bbced123f.txt
Akzeptierte Antwort
Weitere Antworten (1)
ES
am 21 Jan. 2014
you have to handle the last dot(before file extension) and the other dots separately.
str='bbc.ed.123.f.txt';
idx=strfind(str,'.');
new_str=[strrep(str(1:idx(end)-1),'.',''),str(idx(end):end)];%idx(end) is the position of the last dot!
Kategorien
Mehr zu Characters and Strings finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!