How to select a character array if it has a specific end value

2 vues (au cours des 30 derniers jours)
Elena
Elena le 24 Fév 2022
Modifié(e) : Elena le 24 Fév 2022
say this is my input:
emails = 'myemail@gmail.com, random@yahoo.com, notanemail'
I would only want to select the values that contain @gmail or @yahoo (etc.) so not the last one becasue it's not an email. How could i do this?

Réponse acceptée

Steven Lord
Steven Lord le 24 Fév 2022
See the split and contains functions.

Plus de réponses (0)

Catégories

En savoir plus sur Manage Products dans Help Center et File Exchange

Tags

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by