필터 지우기
필터 지우기

Removing part of file name (random numbers )

조회 수: 12 (최근 30일)
AAS
AAS 2022년 3월 9일
답변: Jan 2022년 3월 9일
Hi,
I need to remove part of fodler names that contains random numbers so I cannot really use strrep.
the files look like this "A_m_T17__75788", "A_m_T18__63071", "A_m_T19__51148" and I want to replace it with "A_m_T17","A_m_T18" ,"A_m_T19" so on and so forth.
Appreciate any help or guidance!!

채택된 답변

Jan
Jan 2022년 3월 9일
Names = ["A_m_T17__75788", "A_m_T18__63071", "A_m_T19__51148"];
Cleaned = extractBefore(Names, '__')
Cleaned = 1×3 string array
"A_m_T17" "A_m_T18" "A_m_T19"

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Deploy to C++ Applications Using mwArray API (C++03)에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by