replacing part of a string

2 visualizaciones (últimos 30 días)
joseph Frank
joseph Frank el 22 de Jul. de 2011
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?

Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 22 de Jul. de 2011
A={'US313384RJ03(GP)','US313384RJ03(GP)'};
A=strrep(A,'US','1032');
A=strrep(A,'(GP)','');

Más respuestas (0)

Categorías

Más información sobre Characters and Strings en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by