How to split string on the last delimiter?
Afficher commentaires plus anciens
I am supposed to separate a string 'abcdef@eng.abc.edu' into three separate string 'abcdef', 'eng.abc', 'edu' using strsplit function. However, I don't know how to split the string at the last . delimiter instead of separate them into four strings using C = strsplit('abcdef@eng.abc.edu',{'@','.'}). Please help, thanks!
1 commentaire
dpb
le 26 Nov 2016
Well, you've got to have some other rule that tells you to not consider one delimiter a delimiter at all...what is that rule? You'd have to start by separating out the domain from the address then parse off the last TLD (top-level domain) by searching for the last dot.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Characters and Strings dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!