how to judge some bytes is or not a-z,A-Z?

i read some files using fread ,then some bytes display like blank , but there is sth.,i want to delete these special chars ,how to make it ? thanks

 Respuesta aceptada

Mischa Kim
Mischa Kim el 27 de Jun. de 2014
Editada: Mischa Kim el 27 de Jun. de 2014
Roger, use regular expressions, something like
str = 'a b{}c1230O /&" â'
str =
a b{}c1230O /&" â
str_rep = regexprep(str,'[^a-zA-Z0-9]','')
str_rep =
abc1230O

Más respuestas (0)

Categorías

Más información sobre Characters and Strings en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 27 de Jun. de 2014

Editada:

el 27 de Jun. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by