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

2 次查看(过去 30 天)
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?

采纳的回答

Steven Lord
Steven Lord 2022-2-24
See the split and contains functions.

更多回答(0 个)

标签

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by