replacing part of a string

조회 수: 2 (최근 30일)
joseph Frank
joseph Frank 2011년 7월 22일
Hi,
I have a column with cells that have the following format: US313384RJ03(GP)
I want to replace "US" by 1032 and delete completely (GP). How can I do so?

채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 7월 22일
A={'US313384RJ03(GP)','US313384RJ03(GP)'};
A=strrep(A,'US','1032');
A=strrep(A,'(GP)','');

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by