# MATLAB: Hello, any one help me, i want to find the fastest way to solve the next problem:

cell arraysfindstrings

Here is the deal: I have the next cell of strings (for example)
cellstr = 'Cla' 'Ble' 'Cli 'Blo' 'Cle'
next i use "strfind( )" to find certain string in this cell, so lets say I want to find the word that has the Characters "B" and "e". The code i'm using is:
FindB = strfind(cellstr, 'B') => FindB = [] [1] [] [1] [].
Finde = strfind(cellstr, 'e') => Finde = [] [1] [] [] [1]
So how can i now the intersection of these 2, so i can say where the word "Ble" is without having to loop throught all the elements. I want to do these with cells arrays of 10000 elements.
(sorry for bad English). Thanks. César Correa.

str = {'Cla', 'Ble', 'Cli', 'Blo', 'Cle'};charstomatch = 'Be';   %order does not matter.ismatch = cellfun(@(s) all(ismember(charstomatch, s)), str)
str = {'Cla', 'Ble', 'Cli', 'Blo', 'Cle'};sstr = string(str);ismatch = sstr.contains('B') & sstr.contains('e')
str = {'Cla', 'Ble', 'Cli', 'Blo', 'Cle'};ismatch = ~cellfun(@isempty, strfind(str, 'B')) & ~cellfun(@isempty, strfind(str, 'e'))
str = {'Cla', 'Ble', 'Cli', 'Blo', 'Cle'};ismatch = ~cellfun(@isempty, regexp(str, '(B[^e]*e)|(e[^B]*B)', 'once'))