Given a cell array of strings and a search string with single character (?) or multiple character (*) wildness return the indices of the cell array that match.
Examples:
{'abc' 'bdce' 'bkcz'},'b?c' outputs [2 3] 'abc' invalid as ? requires a character
{'abcdfhjkfd' 'cf' 'fjhkc' 'fdjk'}, 'c*f' outputs [1 2], no char required for *
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers15
Suggested Problems
-
Project Euler: Problem 8, Find largest product in a large string of numbers
1307 Solvers
-
Matrix indexing with two vectors of indices
775 Solvers
-
Matrix which contains the values of an other matrix A at the given locations.
239 Solvers
-
Basics: Divide integers to get integer outputs in all cases
136 Solvers
-
404 Solvers
More from this Author309
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
By looking at the solutions, you should probably add a case
c = {'data.mat', 'amat', 'repo.mat', 'matrix', '.mat'}
str = '*.mat'