Use regexp in Matlab to sperate a set of string variable
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I have a set of string data such as :
'H3F3A /// LOC440926'
'GTF2I /// GTF2IP1 /// LOC100093631'
'TMEM189 /// TMEM189-UBE2V1 /// UBE2V1'
'RNPEP /// TMEM189 /// TMEM189-UBE2V1 /// UBE2V1'
I want to operate them according to this symbol "///". I used this expression
genesymbolzSplit = regexp(geneSymbol,'(\w*)\W*','tokens');
It works for the first two rows. Unfortunately, It does not work for the other for example'
TMEM189-UBE2V1' should be one string value but it comes as two
'TMEM189' 'UBE2V1'
Could you help me to sort out the problem I will grateful to you
0 comentarios
Respuesta aceptada
Jan
el 24 de En. de 2016
What about:
c = {'H3F3A /// LOC440926', ...
'GTF2I /// GTF2IP1 /// LOC100093631'};
s = regexp(c, '///', 'split')
Más respuestas (0)
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!