how remove words from a cell array

Hi, I have a cell array A (attached) and I want to delete the words that have the character \.
Example:
A={'past';'life';'amp';'thinks';'hes';'cat\udd\udc';'https\u';'itsyaaboysb';'somebody'};
I want
A={'past';'life';'amp';'thinks';'hes';'itsyaaboysb';'somebody'};
Can you help me? thanks

 採用された回答

Stephen23
Stephen23 2017 年 8 月 2 日
編集済み: Stephen23 2017 年 8 月 2 日

1 投票

>> A = {'past';'life';'amp';'thinks';'hes';'cat\udd\udc';'https\u';'itsyaaboysb';'somebody'};
>> idx = cellfun('isempty',strfind(A,'\'))
>> B = A(idx)
B =
past
life
amp
thinks
hes
itsyaaboysb
somebody

その他の回答 (0 件)

カテゴリ

質問済み:

2017 年 8 月 2 日

編集済み:

2017 年 8 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by