regex - Removing some letters from a string in matlab -
I have such a string id = "MOD09GA.A2008077.h00v08.005.2008080115153.hdf.xml" < / Code>
I want to remove some numbers from the string.
I want it to be "MOD09GA.A2008077.h00v08.hdf"
I know that I regexp (id, '".hdf" ',' Match ')
How can I do this in matlab?
How can I remove additional numbers?
Thank you in advance
You probably want to see and want to:
c = straplip (id, '.'); NewID = Strōjōn (c ([1 2 3 6]), '.'); Alternatively, you can see the regexp
and sprintf
: C = regexp (id, '\.', 'Split' ); NewID = sprintf ('% s.', C [[1 2 3 6]}); NewID (end) = []; Abandon% of the follower '
Comments
Post a Comment