Try this
str1 = 'Animation|Children''s|Comedy';
str2 = 'Animation*';
str3 = 'Animation';
ism = strcmp( str3, regexp( str1, '\|', 'split' ) );
>> whos ism
Name Size Bytes Class Attributes
ism 1x3 3 logical
>> ism
ism =
1 0 0
Note
- double blip in "Children''s"
- strcmp make exact comparisons of strings - no wildcards as in 'Animation*';
- strfind is an alternative to strcmp - see the documentation
Best Answer