Azzera filtri
Azzera filtri

Use regexp in Matlab to sperate a set of string variable

2 visualizzazioni (ultimi 30 giorni)
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

Risposta accettata

Jan
Jan il 24 Gen 2016
What about:
c = {'H3F3A /// LOC440926', ...
'GTF2I /// GTF2IP1 /// LOC100093631'};
s = regexp(c, '///', 'split')

Più risposte (0)

Categorie

Scopri di più su Numeric Types in Help Center e File Exchange

Tag

Non è stata ancora inserito alcun tag.

Community Treasure Hunt

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

Start Hunting!

Translated by