replacement for findstr
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
findstr('text', guidata.dataFile{1,1}.header{i})
header{i} is a 1x4 char (in this example named text)
I have a loop that dynamically generates radio button position and color based on a header row. What I have now works fine but because findstr seems to be on the chopping block I am trying to update the code. I have tried strncmp and regexp but can't seem to figure it out.
Any help is appreciated.
0 comentarios
Respuestas (1)
Jan
el 25 de Ag. de 2011
Do your mean STRFIND?
9 comentarios
Jan
el 25 de Ag. de 2011
FINDSTR had the risky feature that the shorter string is searched in the longer one. If you want to look for the position of 'one' inside 'stone', the reply of FINDSTR will be surprising, if the 2nd string is 'e'.
MATLAB 2009a still ontained several dangerous FINDSTR calls. Perhaps they are replaced by STRFIND now, which searches the 2nd string inside the first one.
Jan
el 25 de Ag. de 2011
FINDSTR had the risky feature that the shorter string is searched in the longer one. If you want to look for the position of 'one' inside 'stone', the reply of FINDSTR will be surprising, if the 2nd string is 'e'.
MATLAB 2009a still ontained several dangerous FINDSTR calls. Perhaps they are replaced by STRFIND now, which searches the 2nd string inside the first one.
Ver también
Categorías
Más información sobre Characters and Strings en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!