Filter a cell array with words
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
AA
le 28 Juil 2019
Réponse apportée : Walter Roberson
le 28 Juil 2019
Hi,
assume you have the cell array{1,1} with a text called "XXXX-adsaads". I want the the portion -adsaads to be removed so that I only get XXXX. How can I do this?
2 commentaires
Walter Roberson
le 28 Juil 2019
Is the "adsaads" known ahead of time? Or are you wanting to find the part before the first - ? or are you wanting to find the part before the last - in cases where there are multiple - ?
Réponse acceptée
Walter Roberson
le 28 Juil 2019
trimedcell = regexprep(YourCellArray, '-.*', '', 'once');
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Multidimensional Arrays dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!