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

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

Risposta accettata

Steven Lord
Steven Lord il 24 Feb 2022
See the split and contains functions.

Più risposte (0)

Categorie

Scopri di più su Manage Products in Help Center e File Exchange

Tag

Prodotti


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by