regexp qwestion

1 visualización (últimos 30 días)
Raldi
Raldi el 2 de Dic. de 2011
Hi everyone
i have an exprecion of the type numstrscheck = regexp(TheString, '-?\d+\.?\d*', 'match');
is there a way that alongside with any other operations that are done inside regexp, to also substitute the letter s of 'TheString' if it has any, with the number one?

Respuesta aceptada

Andrei Bobrov
Andrei Bobrov el 2 de Dic. de 2011
TheString = 'gftr dsrew mkjghfdfsde'
out = regexprep(TheString,'s','1')
  1 comentario
Raldi
Raldi el 2 de Dic. de 2011
Thanks Andrei

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Logical 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