Extract substring in right format
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
DavidL88
el 9 de Nov. de 2021
Comentada: DavidL88
el 9 de Nov. de 2021
How can I get the substring 22_right from the string below? The code below give me _22_right. I need it without the first '_'
str = 'Subject160/VSTMB_160_band_resample/data_22_right_average_210225_1827.mat'
EventName = regexp(str,'[1-9_]+_right','match')
0 comentarios
Respuesta aceptada
DGM
el 9 de Nov. de 2021
Why include the extra _?
str = 'Subject160/VSTMB_160_band_resample/data_22_right_average_210225_1827.mat'
EventName = regexp(str,'[1-9]+_right','match')
Más respuestas (0)
Ver también
Categorías
Más información sobre String Parsing 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!